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

Unified Diff: components/signin/core/browser/signin_manager_base.h

Issue 617183003: Make sure GetAuthenticatedAccountId() returns a canonicalized id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/signin/core/browser/signin_manager_base.h
diff --git a/components/signin/core/browser/signin_manager_base.h b/components/signin/core/browser/signin_manager_base.h
index a7a0f9b6feba6082e6fa388588334353c9698182..96ff87a409650df1bc860f6ce50450a55411c521 100644
--- a/components/signin/core/browser/signin_manager_base.h
+++ b/components/signin/core/browser/signin_manager_base.h
@@ -78,7 +78,7 @@ class SigninManagerBase : public KeyedService {
// If a user has previously signed in (and has not signed out), this returns
// the normalized email address of the account. Otherwise, it returns an empty
// string.
- const std::string& GetAuthenticatedUsername() const;
+ std::string GetAuthenticatedUsername() const;
msarda 2014/10/02 08:48:06 I think this should still return const std::string
Roger Tawa OOO till Jul 10th 2014/10/02 20:31:18 Done.
// If a user has previously signed in (and has not signed out), this returns
// the account id. Otherwise, it returns an empty string. This id can be used
@@ -94,7 +94,7 @@ class SigninManagerBase : public KeyedService {
// normalized email address of the connected account, use
// GetAuthenticatedUsername(). Example: to show the string "Signed in as XXX"
// in the hotdog menu.
- const std::string& GetAuthenticatedAccountId() const;
+ std::string GetAuthenticatedAccountId() const;
msarda 2014/10/02 08:48:06 I think this should still return const std::string
Roger Tawa OOO till Jul 10th 2014/10/02 20:31:17 Done.
// Sets the user name. Note: |username| should be already authenticated as
// this is a sticky operation (in contrast to StartSignIn).
@@ -125,7 +125,7 @@ class SigninManagerBase : public KeyedService {
// Used by subclass to clear authenticated_username_ instead of using
// SetAuthenticatedUsername, which enforces special preconditions due
// to the fact that it is part of the public API and called by clients.
- void clear_authenticated_username();
+ void ClearAuthenticatedUsername();
// List of observers to notify on signin events.
// Makes sure list is empty on destruction.
@@ -146,8 +146,9 @@ class SigninManagerBase : public KeyedService {
SigninClient* client_;
bool initialized_;
- // Actual username after successful authentication.
+ // Actual username and account_id after successful authentication.
std::string authenticated_username_;
+ std::string authenticated_account_id_;
// The list of SigninDiagnosticObservers.
ObserverList<signin_internals_util::SigninDiagnosticsObserver, true>
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | components/signin/core/browser/signin_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698