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

Side by Side Diff: chrome/browser/extensions/updater/extension_downloader.cc

Issue 560913006: Changing the Weakptr initialization order in chrome/browser/extension folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/updater/extension_downloader.h" 5 #include "chrome/browser/extensions/updater/extension_downloader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 ExtensionDownloader::ExtensionFetch::~ExtensionFetch() {} 175 ExtensionDownloader::ExtensionFetch::~ExtensionFetch() {}
176 176
177 ExtensionDownloader::ExtensionDownloader( 177 ExtensionDownloader::ExtensionDownloader(
178 ExtensionDownloaderDelegate* delegate, 178 ExtensionDownloaderDelegate* delegate,
179 net::URLRequestContextGetter* request_context) 179 net::URLRequestContextGetter* request_context)
180 : OAuth2TokenService::Consumer(kTokenServiceConsumerId), 180 : OAuth2TokenService::Consumer(kTokenServiceConsumerId),
181 delegate_(delegate), 181 delegate_(delegate),
182 request_context_(request_context), 182 request_context_(request_context),
183 weak_ptr_factory_(this),
184 manifests_queue_(&kDefaultBackoffPolicy, 183 manifests_queue_(&kDefaultBackoffPolicy,
185 base::Bind(&ExtensionDownloader::CreateManifestFetcher, 184 base::Bind(&ExtensionDownloader::CreateManifestFetcher,
186 base::Unretained(this))), 185 base::Unretained(this))),
187 extensions_queue_(&kDefaultBackoffPolicy, 186 extensions_queue_(&kDefaultBackoffPolicy,
188 base::Bind(&ExtensionDownloader::CreateExtensionFetcher, 187 base::Bind(&ExtensionDownloader::CreateExtensionFetcher,
189 base::Unretained(this))), 188 base::Unretained(this))),
190 extension_cache_(NULL) { 189 extension_cache_(NULL),
190 weak_ptr_factory_(this) {
191 DCHECK(delegate_); 191 DCHECK(delegate_);
192 DCHECK(request_context_.get()); 192 DCHECK(request_context_.get());
193 } 193 }
194 194
195 ExtensionDownloader::~ExtensionDownloader() {} 195 ExtensionDownloader::~ExtensionDownloader() {}
196 196
197 bool ExtensionDownloader::AddExtension(const Extension& extension, 197 bool ExtensionDownloader::AddExtension(const Extension& extension,
198 int request_id) { 198 int request_id) {
199 // Skip extensions with empty update URLs converted from user 199 // Skip extensions with empty update URLs converted from user
200 // scripts. 200 // scripts.
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 942
943 void ExtensionDownloader::OnGetTokenFailure( 943 void ExtensionDownloader::OnGetTokenFailure(
944 const OAuth2TokenService::Request* request, 944 const OAuth2TokenService::Request* request,
945 const GoogleServiceAuthError& error) { 945 const GoogleServiceAuthError& error) {
946 // If we fail to get an access token, kick the pending fetch and let it fall 946 // If we fail to get an access token, kick the pending fetch and let it fall
947 // back on cookies. 947 // back on cookies.
948 extension_fetcher_->Start(); 948 extension_fetcher_->Start();
949 } 949 }
950 950
951 } // namespace extensions 951 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_downloader.h ('k') | chrome/browser/extensions/updater/extension_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698