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

Unified Diff: chrome/browser/extensions/extension_system_impl.h

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_system_impl.h
diff --git a/chrome/browser/extensions/extension_system.h b/chrome/browser/extensions/extension_system_impl.h
similarity index 51%
rename from chrome/browser/extensions/extension_system.h
rename to chrome/browser/extensions/extension_system_impl.h
index 2f83dcc6744afd2a8fd522a5f2b7ebe321bc70d5..1dc9b0b4c5934dbd9d58909d2e98dc734fcea043 100644
--- a/chrome/browser/extensions/extension_system.h
+++ b/chrome/browser/extensions/extension_system_impl.h
@@ -1,139 +1,13 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
James Cook 2014/01/28 23:40:57 2014?
Yoyo Zhou 2014/01/29 00:42:56 Ok, fine. =)
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
-#include "extensions/common/extension.h"
-#include "extensions/common/one_shot_event.h"
-
-class ExtensionService;
-class Profile;
-
-#if defined(OS_CHROMEOS)
-namespace chromeos {
-class DeviceLocalAccountManagementPolicyProvider;
-}
-#endif // defined(OS_CHROMEOS)
-
-namespace content {
-class BrowserContext;
-}
+#include "extensions/browser/extension_system.h"
namespace extensions {
-class Blacklist;
-class ErrorConsole;
-class EventRouter;
-class Extension;
-class ExtensionSystemSharedFactory;
-class ExtensionWarningBadgeService;
-class ExtensionWarningService;
-class InfoMap;
-class InstallVerifier;
-class LazyBackgroundTaskQueue;
-class ManagementPolicy;
-class NavigationObserver;
-class ProcessManager;
-class RuntimeData;
-class StandardManagementPolicyProvider;
-class StateStore;
-class UserScriptMaster;
-
-// The ExtensionSystem manages the creation and destruction of services
-// related to extensions. Most objects are shared between normal
-// and incognito Profiles, except as called out in comments.
-// This interface supports using TestExtensionSystem for TestingProfiles
-// that don't want all of the extensions baggage in their tests.
-class ExtensionSystem : public BrowserContextKeyedService {
- public:
- ExtensionSystem();
- virtual ~ExtensionSystem();
-
- // Returns the instance for the given profile, or NULL if none. This is
- // a convenience wrapper around ExtensionSystemFactory::GetForProfile.
- static ExtensionSystem* Get(Profile* profile);
-
- // Returns the same instance as Get() above.
- static ExtensionSystem* GetForBrowserContext(
- content::BrowserContext* profile);
-
- // BrowserContextKeyedService implementation.
- virtual void Shutdown() OVERRIDE {}
-
- // Initializes extensions machinery.
- // Component extensions are always enabled, external and user extensions are
- // controlled by |extensions_enabled|.
- virtual void InitForRegularProfile(bool extensions_enabled) = 0;
-
- // The ExtensionService is created at startup.
- virtual ExtensionService* extension_service() = 0;
-
- // Per-extension data that can change during the life of the process but
- // does not persist across restarts. Lives on UI thread. Created at startup.
- virtual RuntimeData* runtime_data() = 0;
-
- // The class controlling whether users are permitted to perform certain
- // actions on extensions (install, uninstall, disable, etc.).
- // The ManagementPolicy is created at startup.
- virtual ManagementPolicy* management_policy() = 0;
-
- // The UserScriptMaster is created at startup.
- virtual UserScriptMaster* user_script_master() = 0;
-
- // The ProcessManager is created at startup.
- virtual ProcessManager* process_manager() = 0;
-
- // The StateStore is created at startup.
- virtual StateStore* state_store() = 0;
-
- // The rules store is created at startup.
- virtual StateStore* rules_store() = 0;
-
- // Returns the IO-thread-accessible extension data.
- virtual InfoMap* info_map() = 0;
-
- // The LazyBackgroundTaskQueue is created at startup.
- virtual LazyBackgroundTaskQueue* lazy_background_task_queue() = 0;
-
- // The EventRouter is created at startup.
- virtual EventRouter* event_router() = 0;
-
- // The ExtensionWarningService is created at startup.
- virtual ExtensionWarningService* warning_service() = 0;
-
- // The blacklist is created at startup.
- virtual Blacklist* blacklist() = 0;
-
- // The ErrorConsole is created at startup.
- virtual ErrorConsole* error_console() = 0;
-
- // The InstallVerifier is created at startup.
- virtual InstallVerifier* install_verifier() = 0;
-
- // Called by the ExtensionService that lives in this system. Gives the
- // info map a chance to react to the load event before the EXTENSION_LOADED
- // notification has fired. The purpose for handling this event first is to
- // avoid race conditions by making sure URLRequestContexts learn about new
- // extensions before anything else needs them to know.
- virtual void RegisterExtensionWithRequestContexts(
- const Extension* extension) {}
-
- // Called by the ExtensionService that lives in this system. Lets the
- // info map clean up its RequestContexts once all the listeners to the
- // EXTENSION_UNLOADED notification have finished running.
- virtual void UnregisterExtensionWithRequestContexts(
- const std::string& extension_id,
- const UnloadedExtensionInfo::Reason reason) {}
-
- // Signaled when the extension system has completed its startup tasks.
- virtual const OneShotEvent& ready() const = 0;
-};
// The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl.
// Implementation details: non-shared services are owned by
@@ -260,4 +134,4 @@ class ExtensionSystemImpl : public ExtensionSystem {
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698