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

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

Issue 13454032: Extract DependencyGraph from ProfileDependencyManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added tests Created 7 years, 8 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 5645836787d3069690ac3ba8d6e08317f6c1ccfc..50a76d56d7655a8d1f5fded8195a77b6edab0ba5 100644
--- a/chrome/browser/profiles/profile_dependency_manager.h
+++ b/chrome/browser/profiles/profile_dependency_manager.h
@@ -5,14 +5,11 @@
#ifndef CHROME_BROWSER_PROFILES_PROFILE_DEPENDENCY_MANAGER_H_
#define CHROME_BROWSER_PROFILES_PROFILE_DEPENDENCY_MANAGER_H_
-#include <map>
-#include <vector>
-
#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/dependency_graph.h"
#ifndef NDEBUG
#include <set>
-#include <string>
#endif
class Profile;
@@ -64,9 +61,6 @@ class ProfileDependencyManager {
friend class ProfileDependencyManagerUnittests;
friend struct DefaultSingletonTraits<ProfileDependencyManager>;
- typedef std::multimap<ProfileKeyedBaseFactory*,
- ProfileKeyedBaseFactory*> EdgeMap;
-
ProfileDependencyManager();
virtual ~ProfileDependencyManager();
@@ -74,24 +68,15 @@ class ProfileDependencyManager {
// dependency graph.
void AssertFactoriesBuilt();
- // Using the dependency graph defined in |edges_|, fills |destruction_order_|
- // so that Observe() can notify each ProfileKeyedBaseFactory in order.
- void BuildDestructionOrder(Profile* profile);
-
#ifndef NDEBUG
- // Creates a dot file with our dependency information.
- std::string DumpGraphvizDependency();
+ void DumpProfileDependencies(Profile* profile);
#endif
- std::vector<ProfileKeyedBaseFactory*> all_components_;
-
- EdgeMap edges_;
-
- std::vector<ProfileKeyedBaseFactory*> destruction_order_;
-
// Whether AssertFactoriesBuilt has been done.
bool built_factories_;
+ DependencyGraph dependency_graph_;
+
#ifndef NDEBUG
// A list of profile objects that have gone through the Shutdown()
// phase. These pointers are most likely invalid, but we keep track of their

Powered by Google App Engine
This is Rietveld 408576698