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

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

Issue 2758583002: Remove google-profile-info switch. (Closed)
Patch Set: Revert histograms.xml 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 DCHECK(switches::IsNewProfileManagement()); 182 DCHECK(switches::IsNewProfileManagement());
183 183
184 if (!profile->GetPrefs()->GetString(prefs::kGoogleServicesHostedDomain). 184 if (!profile->GetPrefs()->GetString(prefs::kGoogleServicesHostedDomain).
185 empty()) 185 empty())
186 return; 186 return;
187 187
188 UpdateGaiaProfileInfoIfNeeded(profile); 188 UpdateGaiaProfileInfoIfNeeded(profile);
189 } 189 }
190 190
191 void UpdateGaiaProfileInfoIfNeeded(Profile* profile) { 191 void UpdateGaiaProfileInfoIfNeeded(Profile* profile) {
192 // If the --google-profile-info flag isn't used, then the
193 // GAIAInfoUpdateService isn't initialized, and we can't download the profile
194 // info.
195 if (!switches::IsGoogleProfileInfo())
196 return;
197
198 DCHECK(profile); 192 DCHECK(profile);
199 193
200 GAIAInfoUpdateService* service = 194 GAIAInfoUpdateService* service =
201 GAIAInfoUpdateServiceFactory::GetInstance()->GetForProfile(profile); 195 GAIAInfoUpdateServiceFactory::GetInstance()->GetForProfile(profile);
202 // The service may be null, for example during unit tests. 196 // The service may be null, for example during unit tests.
203 if (service) 197 if (service)
204 service->Update(); 198 service->Update();
205 } 199 }
206 200
207 SigninErrorController* GetSigninErrorController(Profile* profile) { 201 SigninErrorController* GetSigninErrorController(Profile* profile) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool IsPublicSession() { 280 bool IsPublicSession() {
287 #if defined(OS_CHROMEOS) 281 #if defined(OS_CHROMEOS)
288 if (chromeos::LoginState::IsInitialized()) { 282 if (chromeos::LoginState::IsInitialized()) {
289 return chromeos::LoginState::Get()->IsPublicSessionUser(); 283 return chromeos::LoginState::Get()->IsPublicSessionUser();
290 } 284 }
291 #endif 285 #endif
292 return false; 286 return false;
293 } 287 }
294 288
295 } // namespace profiles 289 } // namespace profiles
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profiles_state.h ('k') | chrome/browser/supervised_user/supervised_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698