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

Side by Side Diff: chrome/browser/signin/fake_profile_oauth2_token_service.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
6 #define CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 6 #define CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const ScopeSet& scopes, 145 const ScopeSet& scopes,
146 const GoogleServiceAuthError& error, 146 const GoogleServiceAuthError& error,
147 const std::string& access_token, 147 const std::string& access_token,
148 const base::Time& expiration); 148 const base::Time& expiration);
149 149
150 std::string GetRefreshToken(const std::string& account_id) const; 150 std::string GetRefreshToken(const std::string& account_id) const;
151 151
152 std::vector<PendingRequest> pending_requests_; 152 std::vector<PendingRequest> pending_requests_;
153 153
154 // Maps account ids to their refresh token strings. 154 // Maps account ids to their refresh token strings.
155 std::map<std::string, std::string> refresh_tokens_; 155 std::map<user_manager::UserID, std::string> refresh_tokens_;
156 156
157 // If true, then this fake service will post responses to 157 // If true, then this fake service will post responses to
158 // |FetchOAuth2Token| on the current run loop. There is no need to call 158 // |FetchOAuth2Token| on the current run loop. There is no need to call
159 // |IssueTokenForScope| in this case. 159 // |IssueTokenForScope| in this case.
160 bool auto_post_fetch_response_on_message_loop_; 160 bool auto_post_fetch_response_on_message_loop_;
161 161
162 base::WeakPtrFactory<FakeProfileOAuth2TokenService> weak_ptr_factory_; 162 base::WeakPtrFactory<FakeProfileOAuth2TokenService> weak_ptr_factory_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenService); 164 DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenService);
165 }; 165 };
166 166
167 #endif // CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 167 #endif // CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698