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

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

Issue 313203004: Make ExtensionInstallPrompt::Prompt ref-counted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 6 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 | Annotate | Revision Log
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_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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_standalone_installer.h ('k') | chrome/browser/extensions/webstore_startup_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698