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

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

Issue 502343002: Add account_id to signin manager notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@isauth
Patch Set: Fix android trybots 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
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> 198 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription>
199 ChromeSigninClient::AddCookieChangedCallback( 199 ChromeSigninClient::AddCookieChangedCallback(
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& account_id,
208 const std::string& username,
208 const std::string& password) { 209 const std::string& password) {
209 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) 210 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
210 // Don't store password hash except for users of new profile management. 211 // Don't store password hash except for users of new profile management.
211 if (switches::IsNewProfileManagement()) 212 if (switches::IsNewProfileManagement())
212 chrome::SetLocalAuthCredentials(profile_, password); 213 chrome::SetLocalAuthCredentials(profile_, password);
213 #endif 214 #endif
214 } 215 }
215 216
216 void ChromeSigninClient::Observe(int type, 217 void ChromeSigninClient::Observe(int type,
217 const content::NotificationSource& source, 218 const content::NotificationSource& source,
(...skipping 25 matching lines...) Expand all
243 if (!callbacks_.empty()) 244 if (!callbacks_.empty())
244 return; 245 return;
245 // Note that it's allowed to call this method multiple times without an 246 // Note that it's allowed to call this method multiple times without an
246 // intervening call to |RegisterForCookieChangedNotification()|. 247 // intervening call to |RegisterForCookieChangedNotification()|.
247 content::Source<Profile> source(profile_); 248 content::Source<Profile> source(profile_);
248 if (!registrar_.IsRegistered( 249 if (!registrar_.IsRegistered(
249 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) 250 this, chrome::NOTIFICATION_COOKIE_CHANGED, source))
250 return; 251 return;
251 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); 252 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source);
252 } 253 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.h ('k') | chrome/browser/signin/fake_signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698