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

Side by Side Diff: chrome/browser/extensions/webstore_startup_installer.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extensions/webstore_startup_installer.h" 5 #include "chrome/browser/extensions/webstore_startup_installer.h"
6 6
7 #include "base/memory/ptr_util.h"
8
7 namespace extensions { 9 namespace extensions {
8 10
9 WebstoreStartupInstaller::WebstoreStartupInstaller( 11 WebstoreStartupInstaller::WebstoreStartupInstaller(
10 const std::string& webstore_item_id, 12 const std::string& webstore_item_id,
11 Profile* profile, 13 Profile* profile,
12 bool show_prompt, 14 bool show_prompt,
13 const Callback& callback) 15 const Callback& callback)
14 : WebstoreInstallWithPrompt(webstore_item_id, profile, callback), 16 : WebstoreInstallWithPrompt(webstore_item_id, profile, callback),
15 show_prompt_(show_prompt) { 17 show_prompt_(show_prompt) {
16 set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE); 18 set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE);
17 set_show_post_install_ui(false); 19 set_show_post_install_ui(false);
18 } 20 }
19 21
20 WebstoreStartupInstaller::~WebstoreStartupInstaller() {} 22 WebstoreStartupInstaller::~WebstoreStartupInstaller() {}
21 23
22 scoped_ptr<ExtensionInstallPrompt::Prompt> 24 std::unique_ptr<ExtensionInstallPrompt::Prompt>
23 WebstoreStartupInstaller::CreateInstallPrompt() const { 25 WebstoreStartupInstaller::CreateInstallPrompt() const {
24 if (show_prompt_) { 26 if (show_prompt_) {
25 return make_scoped_ptr(new ExtensionInstallPrompt::Prompt( 27 return base::WrapUnique(new ExtensionInstallPrompt::Prompt(
26 ExtensionInstallPrompt::INSTALL_PROMPT)); 28 ExtensionInstallPrompt::INSTALL_PROMPT));
27 } 29 }
28 return NULL; 30 return NULL;
29 } 31 }
30 32
31 } // namespace extensions 33 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698