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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 465543004: Factor Chrome details out of update manifest fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up forward decls in CMSA Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index dee4596c0957a91fe46dd672bdb2ccb9b96c9ece..0b1cd3c6e3b65a9ef594c1dba3a4c3a99160af71 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -37,17 +37,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"
@@ -56,7 +54,6 @@
#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.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"
@@ -92,8 +89,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;
@@ -116,15 +111,6 @@ namespace {
// Wait this many seconds after an extensions becomes idle before updating it.
const int kUpdateIdleDelay = 5;
-#if defined(ENABLE_EXTENSIONS)
-scoped_ptr<IdentityProvider> CreateWebstoreIdentityProvider(Profile* profile) {
- return make_scoped_ptr<IdentityProvider>(new ProfileIdentityProvider(
- SigninManagerFactory::GetForProfile(profile),
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
- LoginUIServiceFactory::GetForProfile(profile)));
-}
-#endif // defined(ENABLE_EXTENSIONS)
-
} // namespace
// ExtensionService.
@@ -324,8 +310,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(
@@ -586,20 +572,6 @@ bool ExtensionService::UpdateExtension(const std::string& id,
return true;
}
-scoped_ptr<ExtensionDownloader> ExtensionService::CreateExtensionDownloader(
- ExtensionDownloaderDelegate* delegate) {
- scoped_ptr<ExtensionDownloader> downloader;
-#if defined(ENABLE_EXTENSIONS)
- scoped_ptr<IdentityProvider> identity_provider =
- CreateWebstoreIdentityProvider(profile_);
- downloader.reset(new ExtensionDownloader(
- delegate,
- profile_->GetRequestContext()));
- downloader->SetWebstoreIdentityProvider(identity_provider.Pass());
-#endif
- 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.
« no previous file with comments | « chrome/browser/chromeos/extensions/external_cache.cc ('k') | chrome/browser/extensions/extension_system_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698