Index: chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm |
diff --git a/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm |
index 962f5827d8474c9ab6e805aceae84d3c9d0abfeb..604457dc2b6efcb02c1f3605e8676fac4a52cca4 100644 |
--- a/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm |
@@ -107,15 +107,15 @@ class ConfirmBubbleControllerTest : public CocoaTest { |
link_clicked_(false) { |
NSView* view = [test_window() contentView]; |
// This model is owned by the controller created below. |
- model_ = new TestConfirmBubbleModel(&model_deleted_, |
- &accept_clicked_, |
- &cancel_clicked_, |
- &link_clicked_); |
+ model_.reset(new TestConfirmBubbleModel(&model_deleted_, |
+ &accept_clicked_, |
+ &cancel_clicked_, |
+ &link_clicked_)); |
gfx::Point origin(0, 0); |
controller_ = |
[[ConfirmBubbleController alloc] initWithParent:view |
origin:origin.ToCGPoint() |
- model:model_]; |
+ model:model_.Pass()]; |
[view addSubview:[controller_ view] |
positioned:NSWindowAbove |
relativeTo:nil]; |
@@ -125,7 +125,6 @@ class ConfirmBubbleControllerTest : public CocoaTest { |
return (ConfirmBubbleCocoa*)[controller_ view]; |
} |
- TestConfirmBubbleModel* model() const { return model_; } |
bool model_deleted() const { return model_deleted_; } |
bool accept_clicked() const { return accept_clicked_; } |
bool cancel_clicked() const { return cancel_clicked_; } |
@@ -133,7 +132,7 @@ class ConfirmBubbleControllerTest : public CocoaTest { |
private: |
ConfirmBubbleController* controller_; // weak; owns self |
- TestConfirmBubbleModel* model_; // weak |
+ scoped_ptr<TestConfirmBubbleModel> model_; |
bool model_deleted_; |
bool accept_clicked_; |
bool cancel_clicked_; |