Chromium Code Reviews| Index: chrome/browser/signin/chrome_signin_client.cc |
| diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc |
| index f39cb0cb7dfa17e68c3d3dcc5ea938f18aee93e3..f1d722c0b9a7c25a93fe65b00d39c337c9d9241c 100644 |
| --- a/chrome/browser/signin/chrome_signin_client.cc |
| +++ b/chrome/browser/signin/chrome_signin_client.cc |
| @@ -133,17 +133,22 @@ bool ChromeSigninClient::CanRevokeCredentials() { |
| } |
| std::string ChromeSigninClient::GetSigninScopedDeviceId() { |
| - std::string signin_scoped_device_id = |
| + std::string signin_scoped_device_id; |
|
pavely
2014/07/16 00:24:45
I made a mistake in my previous change. If command
|
| + |
| + if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableSigninScopedDeviceId)) { |
| + return signin_scoped_device_id; |
| + } |
| + signin_scoped_device_id = |
| GetPrefs()->GetString(prefs::kGoogleServicesSigninScopedDeviceId); |
| - if (CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kEnableSigninScopedDeviceId) && |
| - signin_scoped_device_id.empty()) { |
| - // If device_id doesn't exist then generate new and save in prefs. |
| - signin_scoped_device_id = base::GenerateGUID(); |
| - DCHECK(!signin_scoped_device_id.empty()); |
| - GetPrefs()->SetString(prefs::kGoogleServicesSigninScopedDeviceId, |
| - signin_scoped_device_id); |
| + if (!signin_scoped_device_id.empty()) { |
| + return signin_scoped_device_id; |
| } |
| + // If device_id doesn't exist then generate new and save in prefs. |
| + signin_scoped_device_id = base::GenerateGUID(); |
| + DCHECK(!signin_scoped_device_id.empty()); |
| + GetPrefs()->SetString(prefs::kGoogleServicesSigninScopedDeviceId, |
| + signin_scoped_device_id); |
| return signin_scoped_device_id; |
| } |