Add an exponential backoff to rechecking the app list doodle.
[chromium-blink-merge.git] / components / keyed_service / ios / browser_state_dependency_manager.cc
blobe5267e3d85f01944b1f181a004950c82654df0ac
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
3 // found in the LICENSE file.
5 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
7 #include "base/memory/singleton.h"
8 #include "base/trace_event/trace_event.h"
9 #include "ios/web/public/browser_state.h"
11 // static
12 BrowserStateDependencyManager* BrowserStateDependencyManager::GetInstance() {
13 return Singleton<BrowserStateDependencyManager>::get();
16 void BrowserStateDependencyManager::RegisterProfilePrefsForServices(
17 const web::BrowserState* context,
18 user_prefs::PrefRegistrySyncable* pref_registry) {
19 RegisterPrefsForServices(context, pref_registry);
22 void BrowserStateDependencyManager::CreateBrowserStateServices(
23 web::BrowserState* context) {
24 DoCreateBrowserStateServices(context, false);
27 void BrowserStateDependencyManager::CreateBrowserStateServicesForTest(
28 web::BrowserState* context) {
29 DoCreateBrowserStateServices(context, true);
32 void BrowserStateDependencyManager::DestroyBrowserStateServices(
33 web::BrowserState* context) {
34 DependencyManager::DestroyContextServices(context);
37 #ifndef NDEBUG
38 void BrowserStateDependencyManager::AssertBrowserStateWasntDestroyed(
39 web::BrowserState* context) {
40 DependencyManager::AssertContextWasntDestroyed(context);
43 void BrowserStateDependencyManager::MarkBrowserStateLiveForTesting(
44 web::BrowserState* context) {
45 DependencyManager::MarkContextLiveForTesting(context);
47 #endif // NDEBUG
49 BrowserStateDependencyManager::BrowserStateDependencyManager() {
52 BrowserStateDependencyManager::~BrowserStateDependencyManager() {
55 void BrowserStateDependencyManager::DoCreateBrowserStateServices(
56 web::BrowserState* context,
57 bool is_testing_context) {
58 TRACE_EVENT0("browser",
59 "BrowserStateDependencyManager::DoCreateBrowserStateServices")
60 DependencyManager::CreateContextServices(context, is_testing_context);
63 #ifndef NDEBUG
64 void BrowserStateDependencyManager::DumpContextDependencies(
65 const base::SupportsUserData* context) const {
67 #endif // NDEBUG