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

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

Issue 931993002: Make image_decoder a Leaky LazyInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 years, 9 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
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 "base/version.h" 8 #include "base/version.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 } 343 }
344 344
345 // Assume ownership of webstore_data. 345 // Assume ownership of webstore_data.
346 webstore_data_ = webstore_data.Pass(); 346 webstore_data_ = webstore_data.Pass();
347 347
348 scoped_refptr<WebstoreInstallHelper> helper = 348 scoped_refptr<WebstoreInstallHelper> helper =
349 new WebstoreInstallHelper(this, 349 new WebstoreInstallHelper(this,
350 id_, 350 id_,
351 manifest, 351 manifest,
352 std::string(), // We don't have any icon data.
353 icon_url, 352 icon_url,
354 profile_->GetRequestContext()); 353 profile_->GetRequestContext());
355 // The helper will call us back via OnWebstoreParseSucces or 354 // The helper will call us back via OnWebstoreParseSucces or
356 // OnWebstoreParseFailure. 355 // OnWebstoreParseFailure.
357 helper->Start(); 356 helper->Start();
358 } 357 }
359 358
360 void WebstoreStandaloneInstaller::OnWebstoreResponseParseFailure( 359 void WebstoreStandaloneInstaller::OnWebstoreResponseParseFailure(
361 const std::string& error) { 360 const std::string& error) {
362 OnWebStoreDataFetcherDone(); 361 OnWebStoreDataFetcherDone();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 void WebstoreStandaloneInstaller::OnWebStoreDataFetcherDone() { 442 void WebstoreStandaloneInstaller::OnWebStoreDataFetcherDone() {
444 // An instance of this class is passed in as a delegate for the 443 // An instance of this class is passed in as a delegate for the
445 // WebstoreInstallHelper, ExtensionInstallPrompt and WebstoreInstaller, and 444 // WebstoreInstallHelper, ExtensionInstallPrompt and WebstoreInstaller, and
446 // therefore needs to remain alive until they are done. Clear the webstore 445 // therefore needs to remain alive until they are done. Clear the webstore
447 // data fetcher to avoid calling Release in AbortInstall while any of these 446 // data fetcher to avoid calling Release in AbortInstall while any of these
448 // operations are in progress. 447 // operations are in progress.
449 webstore_data_fetcher_.reset(); 448 webstore_data_fetcher_.reset();
450 } 449 }
451 450
452 } // namespace extensions 451 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698