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

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: Rebase against ToT 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 | « components/gcm_driver/gcm_stats_recorder_impl.cc ('k') | 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..c0b65ff48f52937963527c9b3c21f611d03132ee 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 may be stored in |accounts_| and if so, it will be destroyed
+ // after 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 | « components/gcm_driver/gcm_stats_recorder_impl.cc ('k') | google_apis/gaia/account_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698