Hi chromiumers,I was reading TranslateBubbleView [1] and noticed that its constructor takes scoped_ptr<TranslateBubbleModel> and that TBV owns the model as it has a |model_| member variable also declared as scoped_ptr.Is this a good pratice (i.e., the ctor taking scoped_ptr)?
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
You are correct that we're not consistent. What TranslateBubbleView does is preferred, as it enforces ownership with the compiler, and makes ownership clear, as opposed to ConfirmBubbleViews where you have to dig in the code to understand what it's trying to do, and you don't have the compiler to enforce it.