| OLD | NEW |
| 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 "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { | 171 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { |
| 172 // If inline sign in is enabled, but account consistency is not, the user's | 172 // If inline sign in is enabled, but account consistency is not, the user's |
| 173 // credentials should be merge into the cookie jar. | 173 // credentials should be merge into the cookie jar. |
| 174 return !switches::IsEnableWebBasedSignin() && | 174 return !switches::IsEnableWebBasedSignin() && |
| 175 !switches::IsEnableAccountConsistency(); | 175 !switches::IsEnableAccountConsistency(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 std::string ChromeSigninClient::GetProductVersion() { | 178 std::string ChromeSigninClient::GetProductVersion() { |
| 179 chrome::VersionInfo chrome_version; | 179 chrome::VersionInfo chrome_version; |
| 180 if (!chrome_version.is_valid()) | |
| 181 return "invalid"; | |
| 182 return chrome_version.CreateVersionString(); | 180 return chrome_version.CreateVersionString(); |
| 183 } | 181 } |
| 184 | 182 |
| 185 bool ChromeSigninClient::IsFirstRun() const { | 183 bool ChromeSigninClient::IsFirstRun() const { |
| 186 #if defined(OS_ANDROID) | 184 #if defined(OS_ANDROID) |
| 187 return false; | 185 return false; |
| 188 #else | 186 #else |
| 189 return first_run::IsChromeFirstRun(); | 187 return first_run::IsChromeFirstRun(); |
| 190 #endif | 188 #endif |
| 191 } | 189 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 if (!callbacks_.empty()) | 242 if (!callbacks_.empty()) |
| 245 return; | 243 return; |
| 246 // Note that it's allowed to call this method multiple times without an | 244 // Note that it's allowed to call this method multiple times without an |
| 247 // intervening call to |RegisterForCookieChangedNotification()|. | 245 // intervening call to |RegisterForCookieChangedNotification()|. |
| 248 content::Source<Profile> source(profile_); | 246 content::Source<Profile> source(profile_); |
| 249 if (!registrar_.IsRegistered( | 247 if (!registrar_.IsRegistered( |
| 250 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) | 248 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) |
| 251 return; | 249 return; |
| 252 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); | 250 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); |
| 253 } | 251 } |
| OLD | NEW |