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

Unified Diff: chrome/browser/profiles/profile_dependency_manager.h

Issue 14967003: Drop more dependencies of ProfileKeyedService infrastructure on chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 7 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/profiles/profile_dependency_manager.h
diff --git a/chrome/browser/profiles/profile_dependency_manager.h b/chrome/browser/profiles/profile_dependency_manager.h
index 50a76d56d7655a8d1f5fded8195a77b6edab0ba5..8c216d151f81d97dddbb3bb6ef78b4e603587b70 100644
--- a/chrome/browser/profiles/profile_dependency_manager.h
+++ b/chrome/browser/profiles/profile_dependency_manager.h
@@ -12,9 +12,12 @@
#include <set>
#endif
-class Profile;
class ProfileKeyedBaseFactory;
+namespace content {
+class BrowserContext;
+}
+
// A singleton that listens for profile destruction notifications and
// rebroadcasts them to each ProfileKeyedBaseFactory in a safe order based
// on the stated dependencies by each service.
@@ -34,7 +37,8 @@ class ProfileDependencyManager {
// done at this time. (If you want your ProfileKeyedService to be started
// with the Profile, override ProfileKeyedBaseFactory::
// ServiceIsCreatedWithProfile() to return true.)
- void CreateProfileServices(Profile* profile, bool is_testing_profile);
+ void CreateProfileServices(content::BrowserContext* profile,
+ bool is_testing_profile);
// Called by each Profile to alert us that we should destroy services
// associated with it.
@@ -46,13 +50,13 @@ class ProfileDependencyManager {
// - Because this class is a singleton and Singletons can't rely on
// NotificationService in unit tests because NotificationService is
// replaced in many tests.
- void DestroyProfileServices(Profile* profile);
+ void DestroyProfileServices(content::BrowserContext* profile);
#ifndef NDEBUG
// Debugging assertion called as part of GetServiceForProfile in debug
// mode. This will NOTREACHED() whenever the user is trying to access a stale
// Profile*.
- void AssertProfileWasntDestroyed(Profile* profile);
+ void AssertProfileWasntDestroyed(content::BrowserContext* profile);
#endif
static ProfileDependencyManager* GetInstance();
@@ -64,17 +68,10 @@ class ProfileDependencyManager {
ProfileDependencyManager();
virtual ~ProfileDependencyManager();
- // Ensures that all the factories have been created before building the
- // dependency graph.
- void AssertFactoriesBuilt();
-
#ifndef NDEBUG
- void DumpProfileDependencies(Profile* profile);
+ void DumpProfileDependencies(content::BrowserContext* profile);
#endif
- // Whether AssertFactoriesBuilt has been done.
- bool built_factories_;
-
DependencyGraph dependency_graph_;
#ifndef NDEBUG
@@ -82,7 +79,7 @@ class ProfileDependencyManager {
// phase. These pointers are most likely invalid, but we keep track of their
// locations in memory so we can nicely assert if we're asked to do anything
// with them.
- std::set<Profile*> dead_profile_pointers_;
+ std::set<content::BrowserContext*> dead_profile_pointers_;
#endif
};

Powered by Google App Engine
This is Rietveld 408576698