Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index 7f6e68d49a012bbcbaed692527593dcf16da12a7..68ccff85756291343bbaf1af8a1f5f7d2a38fdfb 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -41,17 +41,15 @@ |
#include "chrome/browser/extensions/permissions_updater.h" |
#include "chrome/browser/extensions/shared_module_service.h" |
#include "chrome/browser/extensions/unpacked_installer.h" |
+#include "chrome/browser/extensions/updater/chrome_extension_downloader_factory.h" |
#include "chrome/browser/extensions/updater/extension_cache.h" |
#include "chrome/browser/extensions/updater/extension_downloader.h" |
#include "chrome/browser/extensions/updater/extension_updater.h" |
+#include "chrome/browser/google/google_brand.h" |
#include "chrome/browser/profiles/profile.h" |
-#include "chrome/browser/signin/profile_identity_provider.h" |
-#include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
-#include "chrome/browser/signin/signin_manager_factory.h" |
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
#include "chrome/browser/ui/webui/favicon_source.h" |
#include "chrome/browser/ui/webui/ntp/thumbnail_source.h" |
-#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
#include "chrome/browser/ui/webui/theme_source.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/crash_keys.h" |
@@ -60,7 +58,6 @@ |
#include "chrome/common/extensions/manifest_url_handler.h" |
#include "chrome/common/url_constants.h" |
#include "components/crx_file/id_util.h" |
-#include "components/signin/core/browser/signin_manager.h" |
#include "components/startup_metric_utils/startup_metric_utils.h" |
#include "content/public/browser/devtools_agent_host.h" |
#include "content/public/browser/notification_service.h" |
@@ -95,8 +92,6 @@ using content::BrowserThread; |
using content::DevToolsAgentHost; |
using extensions::CrxInstaller; |
using extensions::Extension; |
-using extensions::ExtensionDownloader; |
-using extensions::ExtensionDownloaderDelegate; |
using extensions::ExtensionIdSet; |
using extensions::ExtensionInfo; |
using extensions::ExtensionRegistry; |
@@ -119,13 +114,6 @@ namespace { |
// Wait this many seconds after an extensions becomes idle before updating it. |
const int kUpdateIdleDelay = 5; |
-scoped_ptr<IdentityProvider> CreateWebstoreIdentityProvider(Profile* profile) { |
- return make_scoped_ptr<IdentityProvider>(new ProfileIdentityProvider( |
- SigninManagerFactory::GetForProfile(profile), |
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
- LoginUIServiceFactory::GetForProfile(profile))); |
-} |
- |
} // namespace |
// ExtensionService. |
@@ -319,8 +307,8 @@ ExtensionService::ExtensionService(Profile* profile, |
profile, |
update_frequency, |
extensions::ExtensionCache::GetInstance(), |
- base::Bind(&ExtensionService::CreateExtensionDownloader, |
- base::Unretained(this)))); |
+ base::Bind(ChromeExtensionDownloaderFactory::CreateForProfile, |
+ profile))); |
} |
component_loader_.reset( |
@@ -584,18 +572,6 @@ bool ExtensionService::UpdateExtension(const std::string& id, |
return true; |
} |
-scoped_ptr<ExtensionDownloader> ExtensionService::CreateExtensionDownloader( |
- ExtensionDownloaderDelegate* delegate) { |
- scoped_ptr<ExtensionDownloader> downloader; |
- scoped_ptr<IdentityProvider> identity_provider = |
- CreateWebstoreIdentityProvider(profile_); |
- downloader.reset(new ExtensionDownloader( |
- delegate, |
- profile_->GetRequestContext())); |
- downloader->SetWebstoreIdentityProvider(identity_provider.Pass()); |
- return downloader.Pass(); |
-} |
- |
void ExtensionService::ReloadExtensionImpl( |
// "transient" because the process of reloading may cause the reference |
// to become invalid. Instead, use |extension_id|, a copy. |