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

Side by Side Diff: chrome/browser/profiles/profiles_state.cc

Issue 2762173003: Remove IsNewProfileManagement and EnableNewProfileManagementForTesting (Closed)
Patch Set: Fix compile (add back an include) 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profiles/profiles_state.h" 5 #include "chrome/browser/profiles/profiles_state.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/profiles/profile_manager.h" 22 #include "chrome/browser/profiles/profile_manager.h"
23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
24 #include "chrome/browser/signin/signin_error_controller_factory.h" 24 #include "chrome/browser/signin/signin_error_controller_factory.h"
25 #include "chrome/browser/ui/browser.h" 25 #include "chrome/browser/ui/browser.h"
26 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
27 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
28 #include "chrome/grit/generated_resources.h" 28 #include "chrome/grit/generated_resources.h"
29 #include "components/prefs/pref_registry_simple.h" 29 #include "components/prefs/pref_registry_simple.h"
30 #include "components/prefs/pref_service.h" 30 #include "components/prefs/pref_service.h"
31 #include "components/signin/core/browser/profile_oauth2_token_service.h" 31 #include "components/signin/core/browser/profile_oauth2_token_service.h"
32 #include "components/signin/core/common/profile_management_switches.h"
33 #include "components/signin/core/common/signin_pref_names.h" 32 #include "components/signin/core/common/signin_pref_names.h"
34 #include "content/public/browser/resource_dispatcher_host.h" 33 #include "content/public/browser/resource_dispatcher_host.h"
35 #include "ui/base/l10n/l10n_util.h" 34 #include "ui/base/l10n/l10n_util.h"
36 #include "ui/gfx/text_elider.h" 35 #include "ui/gfx/text_elider.h"
37 36
38 #if defined(OS_CHROMEOS) 37 #if defined(OS_CHROMEOS)
39 #include "chromeos/login/login_state.h" 38 #include "chromeos/login/login_state.h"
40 #endif 39 #endif
41 40
42 namespace profiles { 41 namespace profiles {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ProfileAttributesEntry* entry; 172 ProfileAttributesEntry* entry;
174 if (!g_browser_process->profile_manager()->GetProfileAttributesStorage(). 173 if (!g_browser_process->profile_manager()->GetProfileAttributesStorage().
175 GetProfileAttributesWithPath(profile_path, &entry)) { 174 GetProfileAttributesWithPath(profile_path, &entry)) {
176 return false; 175 return false;
177 } 176 }
178 177
179 return entry->IsSigninRequired(); 178 return entry->IsSigninRequired();
180 } 179 }
181 180
182 void UpdateIsProfileLockEnabledIfNeeded(Profile* profile) { 181 void UpdateIsProfileLockEnabledIfNeeded(Profile* profile) {
183 DCHECK(switches::IsNewProfileManagement());
184
185 if (!profile->GetPrefs()->GetString(prefs::kGoogleServicesHostedDomain). 182 if (!profile->GetPrefs()->GetString(prefs::kGoogleServicesHostedDomain).
186 empty()) 183 empty())
187 return; 184 return;
188 185
189 UpdateGaiaProfileInfoIfNeeded(profile); 186 UpdateGaiaProfileInfoIfNeeded(profile);
190 } 187 }
191 188
192 void UpdateGaiaProfileInfoIfNeeded(Profile* profile) { 189 void UpdateGaiaProfileInfoIfNeeded(Profile* profile) {
193 DCHECK(profile); 190 DCHECK(profile);
194 191
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 bool IsPublicSession() { 279 bool IsPublicSession() {
283 #if defined(OS_CHROMEOS) 280 #if defined(OS_CHROMEOS)
284 if (chromeos::LoginState::IsInitialized()) { 281 if (chromeos::LoginState::IsInitialized()) {
285 return chromeos::LoginState::Get()->IsPublicSessionUser(); 282 return chromeos::LoginState::Get()->IsPublicSessionUser();
286 } 283 }
287 #endif 284 #endif
288 return false; 285 return false;
289 } 286 }
290 287
291 } // namespace profiles 288 } // namespace profiles
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_window.cc ('k') | chrome/browser/ui/app_list/app_list_service_disabled.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698