| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_ | 5 #ifndef COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_ |
| 6 #define COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_ | 6 #define COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
| 14 #include "components/keyed_service/core/keyed_service_export.h" | 15 #include "components/keyed_service/core/keyed_service_export.h" |
| 15 | 16 |
| 16 class DependencyNode; | 17 class DependencyNode; |
| 17 | 18 |
| 18 // Dynamic graph of dependencies between nodes. | 19 // Dynamic graph of dependencies between nodes. |
| 19 class KEYED_SERVICE_EXPORT DependencyGraph { | 20 class KEYED_SERVICE_EXPORT DependencyGraph { |
| 20 public: | 21 public: |
| 21 DependencyGraph(); | 22 DependencyGraph(); |
| 22 ~DependencyGraph(); | 23 ~DependencyGraph(); |
| 23 | 24 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 EdgeMap edges_; | 59 EdgeMap edges_; |
| 59 | 60 |
| 60 // Cached construction order (needs rebuild with BuildConstructionOrder | 61 // Cached construction order (needs rebuild with BuildConstructionOrder |
| 61 // when empty). | 62 // when empty). |
| 62 std::vector<DependencyNode*> construction_order_; | 63 std::vector<DependencyNode*> construction_order_; |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(DependencyGraph); | 65 DISALLOW_COPY_AND_ASSIGN(DependencyGraph); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 #endif // COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_ | 68 #endif // COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_ |
| OLD | NEW |