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

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

Issue 2257113002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « chrome/browser/extensions/webstore_standalone_installer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 7 #include "base/memory/ptr_util.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 10
11 WebstoreStartupInstaller::WebstoreStartupInstaller( 11 WebstoreStartupInstaller::WebstoreStartupInstaller(
12 const std::string& webstore_item_id, 12 const std::string& webstore_item_id,
13 Profile* profile, 13 Profile* profile,
14 bool show_prompt, 14 bool show_prompt,
15 const Callback& callback) 15 const Callback& callback)
16 : WebstoreInstallWithPrompt(webstore_item_id, profile, callback), 16 : WebstoreInstallWithPrompt(webstore_item_id, profile, callback),
17 show_prompt_(show_prompt) { 17 show_prompt_(show_prompt) {
18 set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE); 18 set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE);
19 set_show_post_install_ui(false); 19 set_show_post_install_ui(false);
20 } 20 }
21 21
22 WebstoreStartupInstaller::~WebstoreStartupInstaller() {} 22 WebstoreStartupInstaller::~WebstoreStartupInstaller() {}
23 23
24 std::unique_ptr<ExtensionInstallPrompt::Prompt> 24 std::unique_ptr<ExtensionInstallPrompt::Prompt>
25 WebstoreStartupInstaller::CreateInstallPrompt() const { 25 WebstoreStartupInstaller::CreateInstallPrompt() const {
26 if (show_prompt_) { 26 if (show_prompt_) {
27 return base::WrapUnique(new ExtensionInstallPrompt::Prompt( 27 return base::MakeUnique<ExtensionInstallPrompt::Prompt>(
28 ExtensionInstallPrompt::INSTALL_PROMPT)); 28 ExtensionInstallPrompt::INSTALL_PROMPT);
29 } 29 }
30 return NULL; 30 return NULL;
31 } 31 }
32 32
33 } // namespace extensions 33 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_standalone_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698