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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 } | 161 } |
162 return signin_scoped_device_id; | 162 return signin_scoped_device_id; |
163 } | 163 } |
164 | 164 |
165 void ChromeSigninClient::OnSignedOut() { | 165 void ChromeSigninClient::OnSignedOut() { |
166 GetPrefs()->ClearPref(prefs::kGoogleServicesSigninScopedDeviceId); | 166 GetPrefs()->ClearPref(prefs::kGoogleServicesSigninScopedDeviceId); |
167 ProfileInfoCache& cache = | 167 ProfileInfoCache& cache = |
168 g_browser_process->profile_manager()->GetProfileInfoCache(); | 168 g_browser_process->profile_manager()->GetProfileInfoCache(); |
169 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); | 169 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
170 cache.SetLocalAuthCredentialsOfProfileAtIndex(index, std::string()); | 170 cache.SetLocalAuthCredentialsOfProfileAtIndex(index, std::string()); |
171 cache.SetProfileSigninRequiredAtIndex(index, false); | |
Roger Tawa OOO till Jul 10th
2014/10/31 20:43:55
Should calling SetLocalAuthCredentialsOfProfileAtI
| |
171 } | 172 } |
172 | 173 |
173 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { | 174 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { |
174 return profile_->GetRequestContext(); | 175 return profile_->GetRequestContext(); |
175 } | 176 } |
176 | 177 |
177 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { | 178 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { |
178 // If inline sign in is enabled, but account consistency is not, the user's | 179 // If inline sign in is enabled, but account consistency is not, the user's |
179 // credentials should be merge into the cookie jar. | 180 // credentials should be merge into the cookie jar. |
180 return !switches::IsEnableWebBasedSignin() && | 181 return !switches::IsEnableWebBasedSignin() && |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 if (!callbacks_.empty()) | 249 if (!callbacks_.empty()) |
249 return; | 250 return; |
250 // Note that it's allowed to call this method multiple times without an | 251 // Note that it's allowed to call this method multiple times without an |
251 // intervening call to |RegisterForCookieChangedNotification()|. | 252 // intervening call to |RegisterForCookieChangedNotification()|. |
252 content::Source<Profile> source(profile_); | 253 content::Source<Profile> source(profile_); |
253 if (!registrar_.IsRegistered( | 254 if (!registrar_.IsRegistered( |
254 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) | 255 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) |
255 return; | 256 return; |
256 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); | 257 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); |
257 } | 258 } |
OLD | NEW |