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

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

Issue 2575603002: Add data usage tracking for GAIA auth api (Closed)
Patch Set: Addressed tbansal comments Created 3 years, 11 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
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.cc ('k') | google_apis/gaia/gaia_auth_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_UTIL_H_ 5 #ifndef GOOGLE_APIS_GAIA_GAIA_AUTH_UTIL_H_
6 #define GOOGLE_APIS_GAIA_GAIA_AUTH_UTIL_H_ 6 #define GOOGLE_APIS_GAIA_GAIA_AUTH_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 class GURL; 12 class GURL;
13 13
14 namespace net {
15 class URLFetcher;
16 class URLRequest;
17 } // namespace net
18
14 namespace gaia { 19 namespace gaia {
15 20
16 struct ListedAccount { 21 struct ListedAccount {
17 // The account's ID, as per Chrome, will be determined in the 22 // The account's ID, as per Chrome, will be determined in the
18 // CookieManagerService. 23 // CookieManagerService.
19 std::string id; 24 std::string id;
20 std::string email; 25 std::string email;
21 std::string gaia_id; 26 std::string gaia_id;
22 std::string raw_email; 27 std::string raw_email;
23 bool valid; 28 bool valid;
(...skipping 28 matching lines...) Expand all
52 // Parses JSON data returned by /ListAccounts call, returning a vector of 57 // Parses JSON data returned by /ListAccounts call, returning a vector of
53 // email/valid pairs. An email addresses is considered valid if a passive 58 // email/valid pairs. An email addresses is considered valid if a passive
54 // login would succeed (i.e. the user does not need to reauthenticate). 59 // login would succeed (i.e. the user does not need to reauthenticate).
55 // If there an error parsing the JSON, then false is returned. 60 // If there an error parsing the JSON, then false is returned.
56 // If either |accounts| or |signed_out_accounts| is null, the corresponding 61 // If either |accounts| or |signed_out_accounts| is null, the corresponding
57 // accounts returned from /ListAccounts will be ignored. 62 // accounts returned from /ListAccounts will be ignored.
58 bool ParseListAccountsData(const std::string& data, 63 bool ParseListAccountsData(const std::string& data,
59 std::vector<ListedAccount>* accounts, 64 std::vector<ListedAccount>* accounts,
60 std::vector<ListedAccount>* signed_out_accounts); 65 std::vector<ListedAccount>* signed_out_accounts);
61 66
67 // Returns true if the URL request originated from GAIA.
68 bool RequestOriginatedFromGaia(const net::URLRequest& request);
69
70 // Marks the URL request as a Gaia request.
71 void MarkURLFetcherAsGaia(net::URLFetcher* request);
72
62 } // namespace gaia 73 } // namespace gaia
63 74
64 #endif // GOOGLE_APIS_GAIA_GAIA_AUTH_UTIL_H_ 75 #endif // GOOGLE_APIS_GAIA_GAIA_AUTH_UTIL_H_
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.cc ('k') | google_apis/gaia/gaia_auth_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698