| 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_standalone_installer.h" | 5 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
| 9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 WebstoreStandaloneInstaller::CreateInstallUI() { | 254 WebstoreStandaloneInstaller::CreateInstallUI() { |
| 255 std::string error; | 255 std::string error; |
| 256 localized_extension_for_display_ = | 256 localized_extension_for_display_ = |
| 257 ExtensionInstallPrompt::GetLocalizedExtensionForDisplay( | 257 ExtensionInstallPrompt::GetLocalizedExtensionForDisplay( |
| 258 manifest_.get(), | 258 manifest_.get(), |
| 259 Extension::REQUIRE_KEY | Extension::FROM_WEBSTORE, | 259 Extension::REQUIRE_KEY | Extension::FROM_WEBSTORE, |
| 260 id_, | 260 id_, |
| 261 localized_name_, | 261 localized_name_, |
| 262 localized_description_, | 262 localized_description_, |
| 263 &error); | 263 &error); |
| 264 if (!localized_extension_for_display_) { | 264 if (!localized_extension_for_display_.get()) { |
| 265 CompleteInstall(kInvalidManifestError); | 265 CompleteInstall(kInvalidManifestError); |
| 266 return; | 266 return; |
| 267 } | 267 } |
| 268 | 268 |
| 269 install_ui_.reset(new ExtensionInstallPrompt(GetWebContents())); | 269 install_ui_.reset(new ExtensionInstallPrompt(GetWebContents())); |
| 270 install_ui_->ConfirmStandaloneInstall(this, | 270 install_ui_->ConfirmStandaloneInstall( |
| 271 localized_extension_for_display_, | 271 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); |
| 272 &icon_, | |
| 273 *install_prompt_); | |
| 274 } | 272 } |
| 275 | 273 |
| 276 } // namespace extensions | 274 } // namespace extensions |
| OLD | NEW |