OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_ | 5 #ifndef IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_ |
6 #define IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_ | 6 #define IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "google_apis/gaia/gaia_auth_fetcher.h" | 11 #include "google_apis/gaia/gaia_auth_fetcher.h" |
| 12 #include "net/traffic_annotation/network_traffic_annotation.h" |
12 | 13 |
13 class GaiaAuthFetcherIOSBridge; | 14 class GaiaAuthFetcherIOSBridge; |
14 | 15 |
15 namespace web { | 16 namespace web { |
16 class BrowserState; | 17 class BrowserState; |
17 } | 18 } |
18 | 19 |
19 // Specialization of GaiaAuthFetcher on iOS. | 20 // Specialization of GaiaAuthFetcher on iOS. |
20 // | 21 // |
21 // Authenticate a user against the Google Accounts ClientLogin API | 22 // Authenticate a user against the Google Accounts ClientLogin API |
(...skipping 19 matching lines...) Expand all Loading... |
41 net::URLRequestContextGetter* getter, | 42 net::URLRequestContextGetter* getter, |
42 web::BrowserState* browser_state); | 43 web::BrowserState* browser_state); |
43 ~GaiaAuthFetcherIOS() override; | 44 ~GaiaAuthFetcherIOS() override; |
44 | 45 |
45 void CancelRequest() override; | 46 void CancelRequest() override; |
46 | 47 |
47 private: | 48 private: |
48 friend class GaiaAuthFetcherIOSBridge; | 49 friend class GaiaAuthFetcherIOSBridge; |
49 friend class GaiaAuthFetcherIOSTest; | 50 friend class GaiaAuthFetcherIOSTest; |
50 | 51 |
51 void CreateAndStartGaiaFetcher(const std::string& body, | 52 void CreateAndStartGaiaFetcher( |
52 const std::string& headers, | 53 const std::string& body, |
53 const GURL& gaia_gurl, | 54 const std::string& headers, |
54 int load_flags) override; | 55 const GURL& gaia_gurl, |
| 56 int load_flags, |
| 57 const net::NetworkTrafficAnnotationTag& traffic_annotation) override; |
55 void FetchComplete(const GURL& url, | 58 void FetchComplete(const GURL& url, |
56 const std::string& data, | 59 const std::string& data, |
57 const net::ResponseCookies& cookies, | 60 const net::ResponseCookies& cookies, |
58 const net::URLRequestStatus& status, | 61 const net::URLRequestStatus& status, |
59 int response_code); | 62 int response_code); |
60 | 63 |
61 std::unique_ptr<GaiaAuthFetcherIOSBridge> bridge_; | 64 std::unique_ptr<GaiaAuthFetcherIOSBridge> bridge_; |
62 web::BrowserState* browser_state_; | 65 web::BrowserState* browser_state_; |
63 | 66 |
64 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcherIOS); | 67 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcherIOS); |
65 }; | 68 }; |
66 | 69 |
67 #endif // IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_ | 70 #endif // IOS_CHROME_BROWSER_SIGNIN_GAIA_AUTH_FETCHER_IOS_H_ |
OLD | NEW |