| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/profiles/profile_dependency_manager.h" | 5 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <iterator> | 9 #include <iterator> |
| 10 | 10 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 return Singleton<ProfileDependencyManager>::get(); | 184 return Singleton<ProfileDependencyManager>::get(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 ProfileDependencyManager::ProfileDependencyManager() | 187 ProfileDependencyManager::ProfileDependencyManager() |
| 188 : built_factories_(false) { | 188 : built_factories_(false) { |
| 189 } | 189 } |
| 190 | 190 |
| 191 ProfileDependencyManager::~ProfileDependencyManager() {} | 191 ProfileDependencyManager::~ProfileDependencyManager() {} |
| 192 | 192 |
| 193 // This method gets the instance of each ServiceFactory. We do this so that | 193 // This method gets the instance of each ServiceFactory. We do this so that |
| 194 // each ServiceFactory initializes iteslf and registers its dependencies with | 194 // each ServiceFactory initializes itself and registers its dependencies with |
| 195 // the global PreferenceDependencyManager. We need to have a complete | 195 // the global PreferenceDependencyManager. We need to have a complete |
| 196 // dependency graph when we create a profile so we can dispatch the profile | 196 // dependency graph when we create a profile so we can dispatch the profile |
| 197 // creation message to the services that want to create their services at | 197 // creation message to the services that want to create their services at |
| 198 // profile creation time. | 198 // profile creation time. |
| 199 // | 199 // |
| 200 // TODO(erg): This needs to be something else. I don't think putting every | 200 // TODO(erg): This needs to be something else. I don't think putting every |
| 201 // FooServiceFactory here will scale or is desireable long term. | 201 // FooServiceFactory here will scale or is desireable long term. |
| 202 void ProfileDependencyManager::AssertFactoriesBuilt() { | 202 void ProfileDependencyManager::AssertFactoriesBuilt() { |
| 203 if (built_factories_) | 203 if (built_factories_) |
| 204 return; | 204 return; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 391 } |
| 392 | 392 |
| 393 result.append("\n /* Toplevel profile */\n"); | 393 result.append("\n /* Toplevel profile */\n"); |
| 394 result.append(" Profile [shape=box];\n"); | 394 result.append(" Profile [shape=box];\n"); |
| 395 | 395 |
| 396 result.append("}\n"); | 396 result.append("}\n"); |
| 397 return result; | 397 return result; |
| 398 } | 398 } |
| 399 | 399 |
| 400 #endif | 400 #endif |
| OLD | NEW |