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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 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 "chrome/browser/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (profile_->IsLegacySupervised()) { 135 if (profile_->IsLegacySupervised()) {
136 LOG(ERROR) << "Attempt to revoke supervised user refresh " 136 LOG(ERROR) << "Attempt to revoke supervised user refresh "
137 << "token detected, ignoring."; 137 << "token detected, ignoring.";
138 return false; 138 return false;
139 } 139 }
140 #endif 140 #endif
141 return true; 141 return true;
142 } 142 }
143 143
144 std::string ChromeSigninClient::GetSigninScopedDeviceId() { 144 std::string ChromeSigninClient::GetSigninScopedDeviceId() {
145 if (CommandLine::ForCurrentProcess()->HasSwitch( 145 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
146 switches::kDisableSigninScopedDeviceId)) { 146 switches::kDisableSigninScopedDeviceId)) {
147 return std::string(); 147 return std::string();
148 } 148 }
149 149
150 std::string signin_scoped_device_id = 150 std::string signin_scoped_device_id =
151 GetPrefs()->GetString(prefs::kGoogleServicesSigninScopedDeviceId); 151 GetPrefs()->GetString(prefs::kGoogleServicesSigninScopedDeviceId);
152 if (signin_scoped_device_id.empty()) { 152 if (signin_scoped_device_id.empty()) {
153 // If device_id doesn't exist then generate new and save in prefs. 153 // If device_id doesn't exist then generate new and save in prefs.
154 signin_scoped_device_id = base::GenerateGUID(); 154 signin_scoped_device_id = base::GenerateGUID();
155 DCHECK(!signin_scoped_device_id.empty()); 155 DCHECK(!signin_scoped_device_id.empty());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 void ChromeSigninClient::PostSignedIn(const std::string& account_id, 226 void ChromeSigninClient::PostSignedIn(const std::string& account_id,
227 const std::string& username, 227 const std::string& username,
228 const std::string& password) { 228 const std::string& password) {
229 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) 229 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
230 // Don't store password hash except when lock is available for the user. 230 // Don't store password hash except when lock is available for the user.
231 if (!password.empty() && profiles::IsLockAvailable(profile_)) 231 if (!password.empty() && profiles::IsLockAvailable(profile_))
232 chrome::SetLocalAuthCredentials(profile_, password); 232 chrome::SetLocalAuthCredentials(profile_, password);
233 #endif 233 #endif
234 } 234 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/account_reconcilor_unittest.cc ('k') | chrome/browser/signin/easy_unlock_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698