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

Unified Diff: google_apis/gaia/account_tracker.h

Issue 1354373002: Cleanup: Pass std::string as const reference from google_apis/ and components/gcm_driver/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert AccountTracker::StopTrackingAccount + add explanation why it wouldn't work Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | google_apis/gaia/account_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/account_tracker.h
diff --git a/google_apis/gaia/account_tracker.h b/google_apis/gaia/account_tracker.h
index 61d3748868bf593a70eebdf17f3c8ada3c0c55ab..d59a5451679a84d8437dbb0348a5862225571b81 100644
--- a/google_apis/gaia/account_tracker.h
+++ b/google_apis/gaia/account_tracker.h
@@ -97,12 +97,17 @@ class AccountTracker : public OAuth2TokenService::Observer,
void NotifyAccountRemoved(const AccountState& account);
void NotifySignInChanged(const AccountState& account);
- void UpdateSignInState(const std::string account_key, bool is_signed_in);
+ void UpdateSignInState(const std::string& account_key, bool is_signed_in);
- void StartTrackingAccount(const std::string account_key);
+ void StartTrackingAccount(const std::string& account_key);
+
+ // Note: |account_key| is passed by value here, because the original
+ // object is stored in |accounts_| and it will be destroyed after
Roger Tawa OOO till Jul 10th 2015/09/21 20:47:40 nit: is --> may be
ki.stfu 2015/09/21 21:34:54 Done.
+ // erasing the key from the map.
void StopTrackingAccount(const std::string account_key);
+
void StopTrackingAllAccounts();
- void StartFetchingUserInfo(const std::string account_key);
+ void StartFetchingUserInfo(const std::string& account_key);
void DeleteFetcher(AccountIdFetcher* fetcher);
IdentityProvider* identity_provider_; // Not owned.
« no previous file with comments | « no previous file | google_apis/gaia/account_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698