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

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

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 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_DOWNLOADER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_DOWNLOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_DOWNLOADER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_DOWNLOADER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, 246 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
247 const GoogleServiceAuthError& error) OVERRIDE; 247 const GoogleServiceAuthError& error) OVERRIDE;
248 248
249 // The delegate that receives the crx files downloaded by the 249 // The delegate that receives the crx files downloaded by the
250 // ExtensionDownloader, and that fills in optional ping and update url data. 250 // ExtensionDownloader, and that fills in optional ping and update url data.
251 ExtensionDownloaderDelegate* delegate_; 251 ExtensionDownloaderDelegate* delegate_;
252 252
253 // The request context to use for the URLFetchers. 253 // The request context to use for the URLFetchers.
254 scoped_refptr<net::URLRequestContextGetter> request_context_; 254 scoped_refptr<net::URLRequestContextGetter> request_context_;
255 255
256 // Used to create WeakPtrs to |this|.
257 base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_;
258
259 // Collects UMA samples that are reported when ReportStats() is called. 256 // Collects UMA samples that are reported when ReportStats() is called.
260 URLStats url_stats_; 257 URLStats url_stats_;
261 258
262 // List of data on fetches we're going to do. We limit the number of 259 // List of data on fetches we're going to do. We limit the number of
263 // extensions grouped together in one batch to avoid running into the limits 260 // extensions grouped together in one batch to avoid running into the limits
264 // on the length of http GET requests, so there might be multiple 261 // on the length of http GET requests, so there might be multiple
265 // ManifestFetchData* objects with the same base_url. 262 // ManifestFetchData* objects with the same base_url.
266 typedef std::map<std::pair<int, GURL>, 263 typedef std::map<std::pair<int, GURL>,
267 std::vector<linked_ptr<ManifestFetchData> > > FetchMap; 264 std::vector<linked_ptr<ManifestFetchData> > > FetchMap;
268 FetchMap fetches_preparing_; 265 FetchMap fetches_preparing_;
(...skipping 17 matching lines...) Expand all
286 // download requests. May be NULL. 283 // download requests. May be NULL.
287 scoped_ptr<IdentityProvider> identity_provider_; 284 scoped_ptr<IdentityProvider> identity_provider_;
288 285
289 // A Webstore download-scoped access token for the |identity_provider_|'s 286 // A Webstore download-scoped access token for the |identity_provider_|'s
290 // active account, if any. 287 // active account, if any.
291 std::string access_token_; 288 std::string access_token_;
292 289
293 // A pending token fetch request. 290 // A pending token fetch request.
294 scoped_ptr<OAuth2TokenService::Request> access_token_request_; 291 scoped_ptr<OAuth2TokenService::Request> access_token_request_;
295 292
293 // Used to create WeakPtrs to |this|.
294 base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_;
295
296 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloader); 296 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloader);
297 }; 297 };
298 298
299 } // namespace extensions 299 } // namespace extensions
300 300
301 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_DOWNLOADER_H_ 301 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_DOWNLOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_cache_impl.cc ('k') | chrome/browser/extensions/updater/extension_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698