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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 localized_name_, | 318 localized_name_, |
319 localized_description_, | 319 localized_description_, |
320 &error); | 320 &error); |
321 if (!localized_extension_for_display_.get()) { | 321 if (!localized_extension_for_display_.get()) { |
322 CompleteInstall(kInvalidManifestError); | 322 CompleteInstall(kInvalidManifestError); |
323 return; | 323 return; |
324 } | 324 } |
325 | 325 |
326 install_ui_ = CreateInstallUI(); | 326 install_ui_ = CreateInstallUI(); |
327 install_ui_->ConfirmStandaloneInstall( | 327 install_ui_->ConfirmStandaloneInstall( |
328 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); | 328 this, localized_extension_for_display_.get(), &icon_, install_prompt_); |
329 } | 329 } |
330 | 330 |
331 void WebstoreStandaloneInstaller::OnWebStoreDataFetcherDone() { | 331 void WebstoreStandaloneInstaller::OnWebStoreDataFetcherDone() { |
332 // An instance of this class is passed in as a delegate for the | 332 // An instance of this class is passed in as a delegate for the |
333 // WebstoreInstallHelper, ExtensionInstallPrompt and WebstoreInstaller, and | 333 // WebstoreInstallHelper, ExtensionInstallPrompt and WebstoreInstaller, and |
334 // therefore needs to remain alive until they are done. Clear the webstore | 334 // therefore needs to remain alive until they are done. Clear the webstore |
335 // data fetcher to avoid calling Release in AbortInstall while any of these | 335 // data fetcher to avoid calling Release in AbortInstall while any of these |
336 // operations are in progress. | 336 // operations are in progress. |
337 webstore_data_fetcher_.reset(); | 337 webstore_data_fetcher_.reset(); |
338 } | 338 } |
339 | 339 |
340 } // namespace extensions | 340 } // namespace extensions |
OLD | NEW |