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

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

Issue 2910053002: Replace deprecated base::NonThreadSafe in components/keyed_service in favor of SequenceChecker. (Closed)
Patch Set: add matching keyed_service\ios tweaks Created 3 years, 6 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
« no previous file with comments | « components/keyed_service/ios/browser_state_keyed_service_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/refcounted_browser_state_keyed_service_fa ctory.h" 5 #include "components/keyed_service/ios/refcounted_browser_state_keyed_service_fa ctory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/keyed_service/core/refcounted_keyed_service.h" 8 #include "components/keyed_service/core/refcounted_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 RefcountedBrowserStateKeyedServiceFactory::GetServiceForBrowserState( 43 RefcountedBrowserStateKeyedServiceFactory::GetServiceForBrowserState(
44 web::BrowserState* context, 44 web::BrowserState* context,
45 bool create) { 45 bool create) {
46 return RefcountedKeyedServiceFactory::GetServiceForContext(context, create); 46 return RefcountedKeyedServiceFactory::GetServiceForContext(context, create);
47 } 47 }
48 48
49 web::BrowserState* 49 web::BrowserState*
50 RefcountedBrowserStateKeyedServiceFactory::GetBrowserStateToUse( 50 RefcountedBrowserStateKeyedServiceFactory::GetBrowserStateToUse(
51 web::BrowserState* context) const { 51 web::BrowserState* context) const {
52 // TODO(crbug.com/701326): This DCHECK should be moved to GetContextToUse(). 52 // TODO(crbug.com/701326): This DCHECK should be moved to GetContextToUse().
53 DCHECK(CalledOnValidThread()); 53 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
54 54
55 // Safe default for Incognito mode: no service. 55 // Safe default for Incognito mode: no service.
56 if (context->IsOffTheRecord()) 56 if (context->IsOffTheRecord())
57 return nullptr; 57 return nullptr;
58 58
59 return context; 59 return context;
60 } 60 }
61 61
62 bool RefcountedBrowserStateKeyedServiceFactory:: 62 bool RefcountedBrowserStateKeyedServiceFactory::
63 ServiceIsCreatedWithBrowserState() const { 63 ServiceIsCreatedWithBrowserState() const {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void RefcountedBrowserStateKeyedServiceFactory::ContextDestroyed( 110 void RefcountedBrowserStateKeyedServiceFactory::ContextDestroyed(
111 base::SupportsUserData* context) { 111 base::SupportsUserData* context) {
112 BrowserStateDestroyed(static_cast<web::BrowserState*>(context)); 112 BrowserStateDestroyed(static_cast<web::BrowserState*>(context));
113 } 113 }
114 114
115 void RefcountedBrowserStateKeyedServiceFactory::RegisterPrefs( 115 void RefcountedBrowserStateKeyedServiceFactory::RegisterPrefs(
116 user_prefs::PrefRegistrySyncable* registry) { 116 user_prefs::PrefRegistrySyncable* registry) {
117 RegisterBrowserStatePrefs(registry); 117 RegisterBrowserStatePrefs(registry);
118 } 118 }
OLDNEW
« no previous file with comments | « components/keyed_service/ios/browser_state_keyed_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698