| 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 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 5 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 BrowserContextDependencyManager::BrowserContextDependencyManager() {} | 77 BrowserContextDependencyManager::BrowserContextDependencyManager() {} |
| 78 | 78 |
| 79 BrowserContextDependencyManager::~BrowserContextDependencyManager() {} | 79 BrowserContextDependencyManager::~BrowserContextDependencyManager() {} |
| 80 | 80 |
| 81 #ifndef NDEBUG | 81 #ifndef NDEBUG |
| 82 void BrowserContextDependencyManager::DumpContextDependencies( | 82 void BrowserContextDependencyManager::DumpContextDependencies( |
| 83 const base::SupportsUserData* context) const { | 83 const base::SupportsUserData* context) const { |
| 84 // Whenever we try to build a destruction ordering, we should also dump a | 84 // Whenever we try to build a destruction ordering, we should also dump a |
| 85 // dependency graph to "/path/to/context/context-dependencies.dot". | 85 // dependency graph to "/path/to/context/context-dependencies.dot". |
| 86 if (CommandLine::ForCurrentProcess()->HasSwitch( | 86 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 87 kDumpBrowserContextDependencyGraphFlag)) { | 87 kDumpBrowserContextDependencyGraphFlag)) { |
| 88 base::FilePath dot_file = | 88 base::FilePath dot_file = |
| 89 static_cast<const content::BrowserContext*>(context) | 89 static_cast<const content::BrowserContext*>(context) |
| 90 ->GetPath() | 90 ->GetPath() |
| 91 .AppendASCII("browser-context-dependencies.dot"); | 91 .AppendASCII("browser-context-dependencies.dot"); |
| 92 DumpDependenciesAsGraphviz("BrowserContext", dot_file); | 92 DumpDependenciesAsGraphviz("BrowserContext", dot_file); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 #endif // NDEBUG | 95 #endif // NDEBUG |
| OLD | NEW |