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_keyed_service_factory.h" | 5 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/keyed_service/core/keyed_service.h" | 8 #include "components/keyed_service/core/keyed_service.h" |
9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
10 #include "ios/web/public/browser_state.h" | 10 #include "ios/web/public/browser_state.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void BrowserStateKeyedServiceFactory::BrowserStateShutdown( | 66 void BrowserStateKeyedServiceFactory::BrowserStateShutdown( |
67 web::BrowserState* context) { | 67 web::BrowserState* context) { |
68 KeyedServiceFactory::ContextShutdown(context); | 68 KeyedServiceFactory::ContextShutdown(context); |
69 } | 69 } |
70 | 70 |
71 void BrowserStateKeyedServiceFactory::BrowserStateDestroyed( | 71 void BrowserStateKeyedServiceFactory::BrowserStateDestroyed( |
72 web::BrowserState* context) { | 72 web::BrowserState* context) { |
73 KeyedServiceFactory::ContextDestroyed(context); | 73 KeyedServiceFactory::ContextDestroyed(context); |
74 } | 74 } |
75 | 75 |
76 scoped_ptr<KeyedService> | 76 std::unique_ptr<KeyedService> |
77 BrowserStateKeyedServiceFactory::BuildServiceInstanceFor( | 77 BrowserStateKeyedServiceFactory::BuildServiceInstanceFor( |
78 base::SupportsUserData* context) const { | 78 base::SupportsUserData* context) const { |
79 return BuildServiceInstanceFor(static_cast<web::BrowserState*>(context)); | 79 return BuildServiceInstanceFor(static_cast<web::BrowserState*>(context)); |
80 } | 80 } |
81 | 81 |
82 bool BrowserStateKeyedServiceFactory::IsOffTheRecord( | 82 bool BrowserStateKeyedServiceFactory::IsOffTheRecord( |
83 base::SupportsUserData* context) const { | 83 base::SupportsUserData* context) const { |
84 return static_cast<web::BrowserState*>(context)->IsOffTheRecord(); | 84 return static_cast<web::BrowserState*>(context)->IsOffTheRecord(); |
85 } | 85 } |
86 | 86 |
(...skipping 13 matching lines...) Expand all Loading... |
100 | 100 |
101 void BrowserStateKeyedServiceFactory::ContextDestroyed( | 101 void BrowserStateKeyedServiceFactory::ContextDestroyed( |
102 base::SupportsUserData* context) { | 102 base::SupportsUserData* context) { |
103 BrowserStateDestroyed(static_cast<web::BrowserState*>(context)); | 103 BrowserStateDestroyed(static_cast<web::BrowserState*>(context)); |
104 } | 104 } |
105 | 105 |
106 void BrowserStateKeyedServiceFactory::RegisterPrefs( | 106 void BrowserStateKeyedServiceFactory::RegisterPrefs( |
107 user_prefs::PrefRegistrySyncable* registry) { | 107 user_prefs::PrefRegistrySyncable* registry) { |
108 RegisterBrowserStatePrefs(registry); | 108 RegisterBrowserStatePrefs(registry); |
109 } | 109 } |
OLD | NEW |