| OLD | NEW |
| 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 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 WebstoreStartupInstaller::WebstoreStartupInstaller( | 9 WebstoreStartupInstaller::WebstoreStartupInstaller( |
| 10 const std::string& webstore_item_id, | 10 const std::string& webstore_item_id, |
| 11 Profile* profile, | 11 Profile* profile, |
| 12 bool show_prompt, | 12 bool show_prompt, |
| 13 const Callback& callback) | 13 const Callback& callback) |
| 14 : WebstoreInstallWithPrompt(webstore_item_id, profile, callback), | 14 : WebstoreInstallWithPrompt(webstore_item_id, profile, callback), |
| 15 show_prompt_(show_prompt) { | 15 show_prompt_(show_prompt) { |
| 16 set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE); | 16 set_install_source(WebstoreInstaller::INSTALL_SOURCE_INLINE); |
| 17 } | 17 } |
| 18 | 18 |
| 19 WebstoreStartupInstaller::~WebstoreStartupInstaller() {} | 19 WebstoreStartupInstaller::~WebstoreStartupInstaller() {} |
| 20 | 20 |
| 21 scoped_ptr<ExtensionInstallPrompt::Prompt> | 21 scoped_refptr<ExtensionInstallPrompt::Prompt> |
| 22 WebstoreStartupInstaller::CreateInstallPrompt() const { | 22 WebstoreStartupInstaller::CreateInstallPrompt() const { |
| 23 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt; | |
| 24 if (show_prompt_) { | 23 if (show_prompt_) { |
| 25 prompt.reset(new ExtensionInstallPrompt::Prompt( | 24 return new ExtensionInstallPrompt::Prompt( |
| 26 ExtensionInstallPrompt::INSTALL_PROMPT)); | 25 ExtensionInstallPrompt::INSTALL_PROMPT); |
| 27 } | 26 } |
| 28 return prompt.Pass(); | 27 return NULL; |
| 29 } | 28 } |
| 30 | 29 |
| 31 } // namespace extensions | 30 } // namespace extensions |
| OLD | NEW |