Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h" 5 #include "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 if (![self isOwned]) 140 if (![self isOwned])
141 return; 141 return;
142 WindowOpenDisposition disposition = 142 WindowOpenDisposition disposition =
143 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 143 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
144 if ([self delegate]->AsConfirmInfoBarDelegate()->LinkClicked(disposition)) 144 if ([self delegate]->AsConfirmInfoBarDelegate()->LinkClicked(disposition))
145 [self removeSelf]; 145 [self removeSelf];
146 } 146 }
147 147
148 @end 148 @end
149 149
150 scoped_ptr<infobars::InfoBar> InfoBarService::CreateConfirmInfoBar( 150 std::unique_ptr<infobars::InfoBar> InfoBarService::CreateConfirmInfoBar(
151 scoped_ptr<ConfirmInfoBarDelegate> delegate) { 151 std::unique_ptr<ConfirmInfoBarDelegate> delegate) {
152 scoped_ptr<InfoBarCocoa> infobar(new InfoBarCocoa(std::move(delegate))); 152 std::unique_ptr<InfoBarCocoa> infobar(new InfoBarCocoa(std::move(delegate)));
153 base::scoped_nsobject<ConfirmInfoBarController> controller( 153 base::scoped_nsobject<ConfirmInfoBarController> controller(
154 [[ConfirmInfoBarController alloc] initWithInfoBar:infobar.get()]); 154 [[ConfirmInfoBarController alloc] initWithInfoBar:infobar.get()]);
155 infobar->set_controller(controller); 155 infobar->set_controller(controller);
156 return std::move(infobar); 156 return std::move(infobar);
157 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698