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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
index f36c90c52aff3ba1e24dd5ded918c977ca410ed6..b9d72035b5eaff94d7390e5d14422decec764942 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm
@@ -6,9 +6,11 @@
#include <stddef.h>
+#include <memory>
+
#include "base/i18n/rtl.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/bundle_installer.h"
@@ -122,7 +124,7 @@ bool ExtensionInstalledBubble::ShouldShow() {
}
// Implemented here to create the platform specific instance of the BubbleUi.
-scoped_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() {
+std::unique_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() {
// |controller| is owned by the parent window.
ExtensionInstalledBubbleController* controller =
[[ExtensionInstalledBubbleController alloc]
@@ -131,7 +133,7 @@ scoped_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() {
// The bridge to the C++ object that performs shared logic across platforms.
// This tells the controller when to show the bubble.
- return make_scoped_ptr(new ExtensionInstalledBubbleBridge(controller));
+ return base::WrapUnique(new ExtensionInstalledBubbleBridge(controller));
}
@implementation ExtensionInstalledBubbleController
@@ -605,7 +607,7 @@ scoped_ptr<BubbleUi> ExtensionInstalledBubble::BuildBubbleUi() {
}
- (IBAction)onAppShortcutClicked:(id)sender {
- scoped_ptr<extensions::ExtensionInstallUI> install_ui(
+ std::unique_ptr<extensions::ExtensionInstallUI> install_ui(
extensions::CreateExtensionInstallUI(browser_->profile()));
install_ui->OpenAppInstalledUI([self extension]->id());
}

Powered by Google App Engine
This is Rietveld 408576698