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

Side by Side Diff: components/keyed_service/ios/browser_state_dependency_manager.cc

Issue 2749823002: Restore KeyedServiceFactory diagnostics for context use-after-destroy. (Closed)
Patch Set: Refactor SiteEngagementService tests. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698