| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_extension_downloader_factory.
h" | 5 #include "chrome/browser/extensions/updater/chrome_extension_downloader_factory.
h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/updater/extension_downloader.h" | |
| 8 #include "chrome/browser/google/google_brand.h" | 7 #include "chrome/browser/google/google_brand.h" |
| 9 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 8 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/signin/profile_identity_provider.h" | 10 #include "chrome/browser/signin/profile_identity_provider.h" |
| 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 13 #include "chrome/browser/signin/signin_manager_factory.h" | 12 #include "chrome/browser/signin/signin_manager_factory.h" |
| 14 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 13 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| 15 #include "components/omaha_query_params/omaha_query_params.h" | 14 #include "components/omaha_query_params/omaha_query_params.h" |
| 16 #include "components/signin/core/browser/signin_manager.h" | 15 #include "components/signin/core/browser/signin_manager.h" |
| 16 #include "extensions/browser/updater/extension_downloader.h" |
| 17 #include "google_apis/gaia/identity_provider.h" | 17 #include "google_apis/gaia/identity_provider.h" |
| 18 | 18 |
| 19 using extensions::ExtensionDownloader; | 19 using extensions::ExtensionDownloader; |
| 20 using extensions::ExtensionDownloaderDelegate; | 20 using extensions::ExtensionDownloaderDelegate; |
| 21 using omaha_query_params::OmahaQueryParams; | 21 using omaha_query_params::OmahaQueryParams; |
| 22 | 22 |
| 23 scoped_ptr<ExtensionDownloader> | 23 scoped_ptr<ExtensionDownloader> |
| 24 ChromeExtensionDownloaderFactory::CreateForRequestContext( | 24 ChromeExtensionDownloaderFactory::CreateForRequestContext( |
| 25 net::URLRequestContextGetter* request_context, | 25 net::URLRequestContextGetter* request_context, |
| 26 ExtensionDownloaderDelegate* delegate) { | 26 ExtensionDownloaderDelegate* delegate) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 46 ExtensionDownloaderDelegate* delegate) { | 46 ExtensionDownloaderDelegate* delegate) { |
| 47 scoped_ptr<IdentityProvider> identity_provider(new ProfileIdentityProvider( | 47 scoped_ptr<IdentityProvider> identity_provider(new ProfileIdentityProvider( |
| 48 SigninManagerFactory::GetForProfile(profile), | 48 SigninManagerFactory::GetForProfile(profile), |
| 49 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 49 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| 50 LoginUIServiceFactory::GetForProfile(profile))); | 50 LoginUIServiceFactory::GetForProfile(profile))); |
| 51 scoped_ptr<ExtensionDownloader> downloader = | 51 scoped_ptr<ExtensionDownloader> downloader = |
| 52 CreateForRequestContext(profile->GetRequestContext(), delegate); | 52 CreateForRequestContext(profile->GetRequestContext(), delegate); |
| 53 downloader->SetWebstoreIdentityProvider(identity_provider.Pass()); | 53 downloader->SetWebstoreIdentityProvider(identity_provider.Pass()); |
| 54 return downloader.Pass(); | 54 return downloader.Pass(); |
| 55 } | 55 } |
| OLD | NEW |