| 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/ios/browser_state_dependency_manager.h" | 5 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "ios/web/public/browser_state.h" | 9 #include "ios/web/public/browser_state.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void BrowserStateDependencyManager::CreateBrowserStateServicesForTest( | 27 void BrowserStateDependencyManager::CreateBrowserStateServicesForTest( |
| 28 web::BrowserState* context) { | 28 web::BrowserState* context) { |
| 29 DoCreateBrowserStateServices(context, true); | 29 DoCreateBrowserStateServices(context, true); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void BrowserStateDependencyManager::DestroyBrowserStateServices( | 32 void BrowserStateDependencyManager::DestroyBrowserStateServices( |
| 33 web::BrowserState* context) { | 33 web::BrowserState* context) { |
| 34 DependencyManager::DestroyContextServices(context); | 34 DependencyManager::DestroyContextServices(context); |
| 35 } | 35 } |
| 36 | 36 |
| 37 #ifndef NDEBUG | |
| 38 void BrowserStateDependencyManager::AssertBrowserStateWasntDestroyed( | 37 void BrowserStateDependencyManager::AssertBrowserStateWasntDestroyed( |
| 39 web::BrowserState* context) { | 38 web::BrowserState* context) const { |
| 40 DependencyManager::AssertContextWasntDestroyed(context); | 39 DependencyManager::AssertContextWasntDestroyed(context); |
| 41 } | 40 } |
| 42 | 41 |
| 43 void BrowserStateDependencyManager::MarkBrowserStateLiveForTesting( | 42 void BrowserStateDependencyManager::MarkBrowserStateLive( |
| 44 web::BrowserState* context) { | 43 web::BrowserState* context) { |
| 45 DependencyManager::MarkContextLiveForTesting(context); | 44 DependencyManager::MarkContextLive(context); |
| 46 } | 45 } |
| 47 #endif // NDEBUG | |
| 48 | 46 |
| 49 BrowserStateDependencyManager::BrowserStateDependencyManager() { | 47 BrowserStateDependencyManager::BrowserStateDependencyManager() { |
| 50 } | 48 } |
| 51 | 49 |
| 52 BrowserStateDependencyManager::~BrowserStateDependencyManager() { | 50 BrowserStateDependencyManager::~BrowserStateDependencyManager() { |
| 53 } | 51 } |
| 54 | 52 |
| 55 void BrowserStateDependencyManager::DoCreateBrowserStateServices( | 53 void BrowserStateDependencyManager::DoCreateBrowserStateServices( |
| 56 web::BrowserState* context, | 54 web::BrowserState* context, |
| 57 bool is_testing_context) { | 55 bool is_testing_context) { |
| 58 TRACE_EVENT0("browser", | 56 TRACE_EVENT0("browser", |
| 59 "BrowserStateDependencyManager::DoCreateBrowserStateServices") | 57 "BrowserStateDependencyManager::DoCreateBrowserStateServices") |
| 60 DependencyManager::CreateContextServices(context, is_testing_context); | 58 DependencyManager::CreateContextServices(context, is_testing_context); |
| 61 } | 59 } |
| 62 | 60 |
| 63 #ifndef NDEBUG | 61 #ifndef NDEBUG |
| 64 void BrowserStateDependencyManager::DumpContextDependencies( | 62 void BrowserStateDependencyManager::DumpContextDependencies( |
| 65 base::SupportsUserData* context) const { | 63 base::SupportsUserData* context) const { |
| 66 } | 64 } |
| 67 #endif // NDEBUG | 65 #endif // NDEBUG |
| OLD | NEW |