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

Side by Side Diff: google_apis/gaia/gaia_auth_fetcher.h

Issue 2697563002: Pass time since profile was loaded and request count on each ListAccount request to Gaia. (Closed)
Patch Set: Nit Created 3 years, 10 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 #ifndef GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_ 5 #ifndef GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
6 #define GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_ 6 #define GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/time/time.h"
14 #include "google_apis/gaia/gaia_auth_consumer.h" 15 #include "google_apis/gaia/gaia_auth_consumer.h"
15 #include "google_apis/gaia/google_service_auth_error.h" 16 #include "google_apis/gaia/google_service_auth_error.h"
16 #include "net/url_request/url_fetcher_delegate.h" 17 #include "net/url_request/url_fetcher_delegate.h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
18 19
19 // Authenticate a user against the Google Accounts ClientLogin API 20 // Authenticate a user against the Google Accounts ClientLogin API
20 // with various capabilities and return results to a GaiaAuthConsumer. 21 // with various capabilities and return results to a GaiaAuthConsumer.
21 // 22 //
22 // In the future, we will also issue auth tokens from this class. 23 // In the future, we will also issue auth tokens from this class.
23 // This class should be used on a single thread, but it can be whichever thread 24 // This class should be used on a single thread, but it can be whichever thread
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // same as the response to a ClientLogin request, except that captcha 179 // same as the response to a ClientLogin request, except that captcha
179 // challenges are never issued. 180 // challenges are never issued.
180 // 181 //
181 // Either OnClientLoginSuccess or OnClientLoginFailure will be 182 // Either OnClientLoginSuccess or OnClientLoginFailure will be
182 // called on the consumer on the original thread. If |service| is empty, 183 // called on the consumer on the original thread. If |service| is empty,
183 // the call will attempt to fetch uber auth token. 184 // the call will attempt to fetch uber auth token.
184 void StartOAuthLogin(const std::string& access_token, 185 void StartOAuthLogin(const std::string& access_token,
185 const std::string& service); 186 const std::string& service);
186 187
187 // Starts a request to list the accounts in the GAIA cookie. 188 // Starts a request to list the accounts in the GAIA cookie.
188 void StartListAccounts(); 189 //
190 // |profile_load_time| is the origin time used to report to Gaia the time
191 // passed between the moment the profile was loaded and the moment this list
192 // accounts requests is started. This information is required in order to
193 // debug channel ID mismatches observed on the server related to requests
194 // from Chrome (see http://crbug.com/633256).
195 void StartListAccounts(const base::Time& profile_load_time);
189 196
190 // Starts a request to log out the accounts in the GAIA cookie. 197 // Starts a request to log out the accounts in the GAIA cookie.
191 void StartLogOut(); 198 void StartLogOut();
192 199
193 // Starts a request to get the list of URLs to check for connection info. 200 // Starts a request to get the list of URLs to check for connection info.
194 // Returns token/URL pairs to check, and the resulting status can be given to 201 // Returns token/URL pairs to check, and the resulting status can be given to
195 // /MergeSession requests. 202 // /MergeSession requests.
196 void StartGetCheckConnectionInfo(); 203 void StartGetCheckConnectionInfo();
197 204
198 // Starts listing any sessions that exist for the IDP. If all requested scopes 205 // Starts listing any sessions that exist for the IDP. If all requested scopes
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ParseOAuth2TokenPairResponse); 478 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ParseOAuth2TokenPairResponse);
472 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthSuccess); 479 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthSuccess);
473 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthWithQuote); 480 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthWithQuote);
474 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeSuccess); 481 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeSuccess);
475 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeQuote); 482 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeQuote);
476 483
477 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher); 484 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher);
478 }; 485 };
479 486
480 #endif // GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_ 487 #endif // GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698