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

Side by Side Diff: chrome/browser/signin/signin_names_io_thread.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/signin_names_io_thread.h" 5 #include "chrome/browser/signin/signin_names_io_thread.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void SigninNamesOnIOThread::SigninManagerCreated(SigninManagerBase* manager) { 64 void SigninNamesOnIOThread::SigninManagerCreated(SigninManagerBase* manager) {
65 manager->AddObserver(this); 65 manager->AddObserver(this);
66 observed_managers_.insert(manager); 66 observed_managers_.insert(manager);
67 } 67 }
68 68
69 void SigninNamesOnIOThread::SigninManagerShutdown(SigninManagerBase* manager) { 69 void SigninNamesOnIOThread::SigninManagerShutdown(SigninManagerBase* manager) {
70 manager->RemoveObserver(this); 70 manager->RemoveObserver(this);
71 observed_managers_.erase(manager); 71 observed_managers_.erase(manager);
72 } 72 }
73 73
74 void SigninNamesOnIOThread::GoogleSigninSucceeded(const std::string& username, 74 void SigninNamesOnIOThread::GoogleSigninSucceeded(const std::string& account_id,
75 const std::string& username,
75 const std::string& password) { 76 const std::string& password) {
76 PostTaskToIOThread(true, base::UTF8ToUTF16(username)); 77 PostTaskToIOThread(true, base::UTF8ToUTF16(username));
77 } 78 }
78 79
79 void SigninNamesOnIOThread::GoogleSignedOut(const std::string& username) { 80 void SigninNamesOnIOThread::GoogleSignedOut(const std::string& account_id,
81 const std::string& username) {
80 PostTaskToIOThread(false, base::UTF8ToUTF16(username)); 82 PostTaskToIOThread(false, base::UTF8ToUTF16(username));
81 } 83 }
82 84
83 void SigninNamesOnIOThread::CheckOnIOThread() const { 85 void SigninNamesOnIOThread::CheckOnIOThread() const {
84 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 86 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
85 } 87 }
86 88
87 void SigninNamesOnIOThread::CheckOnUIThread() const { 89 void SigninNamesOnIOThread::CheckOnUIThread() const {
88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 90 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
89 } 91 }
(...skipping 16 matching lines...) Expand all
106 108
107 void SigninNamesOnIOThread::UpdateOnIOThread(bool add, 109 void SigninNamesOnIOThread::UpdateOnIOThread(bool add,
108 const base::string16& email) { 110 const base::string16& email) {
109 CheckOnIOThread(); 111 CheckOnIOThread();
110 if (add) { 112 if (add) {
111 emails_.insert(email); 113 emails_.insert(email);
112 } else { 114 } else {
113 emails_.erase(email); 115 emails_.erase(email);
114 } 116 }
115 } 117 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_names_io_thread.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698