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

Side by Side Diff: chrome/browser/sync/profile_sync_service_factory.cc

Issue 335273005: Rename "managed (mode|user)" to "supervised user" (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/sync/profile_sync_service_factory.h" 5 #include "chrome/browser/sync/profile_sync_service_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" 10 #include "chrome/browser/autofill/personal_data_manager_factory.h"
11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
12 #include "chrome/browser/defaults.h" 12 #include "chrome/browser/defaults.h"
13 #include "chrome/browser/history/history_service_factory.h" 13 #include "chrome/browser/history/history_service_factory.h"
14 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 14 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
15 #include "chrome/browser/password_manager/password_store_factory.h" 15 #include "chrome/browser/password_manager/password_store_factory.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/search_engines/template_url_service_factory.h" 18 #include "chrome/browser/search_engines/template_url_service_factory.h"
19 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 19 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
20 #include "chrome/browser/sessions/tab_restore_service_factory.h" 20 #include "chrome/browser/sessions/tab_restore_service_factory.h"
21 #include "chrome/browser/signin/about_signin_internals_factory.h" 21 #include "chrome/browser/signin/about_signin_internals_factory.h"
22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
23 #include "chrome/browser/signin/signin_manager_factory.h" 23 #include "chrome/browser/signin/signin_manager_factory.h"
24 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h"
25 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" 24 #include "chrome/browser/sync/profile_sync_components_factory_impl.h"
26 #include "chrome/browser/sync/profile_sync_service.h" 25 #include "chrome/browser/sync/profile_sync_service.h"
27 #include "chrome/browser/sync/startup_controller.h" 26 #include "chrome/browser/sync/startup_controller.h"
27 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h"
28 #include "chrome/browser/themes/theme_service_factory.h" 28 #include "chrome/browser/themes/theme_service_factory.h"
29 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 29 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
30 #include "chrome/browser/webdata/web_data_service_factory.h" 30 #include "chrome/browser/webdata/web_data_service_factory.h"
31 #include "chrome/common/pref_names.h" 31 #include "chrome/common/pref_names.h"
32 #include "components/keyed_service/content/browser_context_dependency_manager.h" 32 #include "components/keyed_service/content/browser_context_dependency_manager.h"
33 #include "components/signin/core/browser/profile_oauth2_token_service.h" 33 #include "components/signin/core/browser/profile_oauth2_token_service.h"
34 #include "components/signin/core/browser/signin_manager.h" 34 #include "components/signin/core/browser/signin_manager.h"
35 #include "extensions/browser/extension_system_provider.h" 35 #include "extensions/browser/extension_system_provider.h"
36 #include "extensions/browser/extensions_browser_client.h" 36 #include "extensions/browser/extensions_browser_client.h"
37 #include "url/gurl.h" 37 #include "url/gurl.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // being signed out. 98 // being signed out.
99 gcm::GCMProfileServiceFactory::GetForProfile(profile); 99 gcm::GCMProfileServiceFactory::GetForProfile(profile);
100 100
101 // TODO(atwilson): Change AboutSigninInternalsFactory to load on startup 101 // TODO(atwilson): Change AboutSigninInternalsFactory to load on startup
102 // once http://crbug.com/171406 has been fixed. 102 // once http://crbug.com/171406 has been fixed.
103 AboutSigninInternalsFactory::GetForProfile(profile); 103 AboutSigninInternalsFactory::GetForProfile(profile);
104 104
105 const GURL sync_service_url = 105 const GURL sync_service_url =
106 ProfileSyncService::GetSyncServiceURL(*CommandLine::ForCurrentProcess()); 106 ProfileSyncService::GetSyncServiceURL(*CommandLine::ForCurrentProcess());
107 107
108 scoped_ptr<ManagedUserSigninManagerWrapper> signin_wrapper( 108 scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper(
109 new ManagedUserSigninManagerWrapper(profile, signin)); 109 new SupervisedUserSigninManagerWrapper(profile, signin));
110 std::string account_id = signin_wrapper->GetAccountIdToUse(); 110 std::string account_id = signin_wrapper->GetAccountIdToUse();
111 OAuth2TokenService::ScopeSet scope_set; 111 OAuth2TokenService::ScopeSet scope_set;
112 scope_set.insert(signin_wrapper->GetSyncScopeToUse()); 112 scope_set.insert(signin_wrapper->GetSyncScopeToUse());
113 ProfileOAuth2TokenService* token_service = 113 ProfileOAuth2TokenService* token_service =
114 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); 114 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
115 net::URLRequestContextGetter* url_request_context_getter = 115 net::URLRequestContextGetter* url_request_context_getter =
116 profile->GetRequestContext(); 116 profile->GetRequestContext();
117 117
118 // TODO(tim): Currently, AUTO/MANUAL settings refer to the *first* time sync 118 // TODO(tim): Currently, AUTO/MANUAL settings refer to the *first* time sync
119 // is set up and *not* a browser restart for a manual-start platform (where 119 // is set up and *not* a browser restart for a manual-start platform (where
(...skipping 19 matching lines...) Expand all
139 139
140 pss->factory()->RegisterDataTypes(pss); 140 pss->factory()->RegisterDataTypes(pss);
141 pss->Initialize(); 141 pss->Initialize();
142 return pss; 142 return pss;
143 } 143 }
144 144
145 // static 145 // static
146 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { 146 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) {
147 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; 147 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL;
148 } 148 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/profile_sync_service_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698