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

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

Issue 508433004: Store local auth credentials after successful login or re-auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ifdef Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/inline_login_handler_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const CookieChangedCallback& callback) { 200 const CookieChangedCallback& callback) {
201 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> 201 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription>
202 subscription = callbacks_.Add(callback); 202 subscription = callbacks_.Add(callback);
203 RegisterForCookieChangedNotification(); 203 RegisterForCookieChangedNotification();
204 return subscription.Pass(); 204 return subscription.Pass();
205 } 205 }
206 206
207 void ChromeSigninClient::GoogleSigninSucceeded(const std::string& username, 207 void ChromeSigninClient::GoogleSigninSucceeded(const std::string& username,
208 const std::string& password) { 208 const std::string& password) {
209 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) 209 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
210 // Don't store password hash except for users of account consistency features. 210 // Don't store password hash except for users of new profile management.
211 if (switches::IsNewProfileManagement()) 211 if (switches::IsNewProfileManagement())
212 chrome::SetLocalAuthCredentials(profile_, password); 212 chrome::SetLocalAuthCredentials(profile_, password);
213 #endif 213 #endif
214 } 214 }
215 215
216 void ChromeSigninClient::Observe(int type, 216 void ChromeSigninClient::Observe(int type,
217 const content::NotificationSource& source, 217 const content::NotificationSource& source,
218 const content::NotificationDetails& details) { 218 const content::NotificationDetails& details) {
219 switch (type) { 219 switch (type) {
220 case chrome::NOTIFICATION_COOKIE_CHANGED: { 220 case chrome::NOTIFICATION_COOKIE_CHANGED: {
(...skipping 22 matching lines...) Expand all
243 if (!callbacks_.empty()) 243 if (!callbacks_.empty())
244 return; 244 return;
245 // Note that it's allowed to call this method multiple times without an 245 // Note that it's allowed to call this method multiple times without an
246 // intervening call to |RegisterForCookieChangedNotification()|. 246 // intervening call to |RegisterForCookieChangedNotification()|.
247 content::Source<Profile> source(profile_); 247 content::Source<Profile> source(profile_);
248 if (!registrar_.IsRegistered( 248 if (!registrar_.IsRegistered(
249 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) 249 this, chrome::NOTIFICATION_COOKIE_CHANGED, source))
250 return; 250 return;
251 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); 251 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source);
252 } 252 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/inline_login_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698