OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LOCAL_DISCOVERY_GCD_BASE_API_FLOW_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_GCD_BASE_API_FLOW_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_GCD_BASE_API_FLOW_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_GCD_BASE_API_FLOW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/local_discovery/privet_constants.h" | 10 #include "chrome/browser/local_discovery/privet_constants.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // If there is no data, set upload_type and upload_data to "" | 47 // If there is no data, set upload_type and upload_data to "" |
48 virtual void GetUploadData(std::string* upload_type, | 48 virtual void GetUploadData(std::string* upload_type, |
49 std::string* upload_data); | 49 std::string* upload_data); |
50 }; | 50 }; |
51 | 51 |
52 // Create an OAuth2-based confirmation. | 52 // Create an OAuth2-based confirmation. |
53 GCDBaseApiFlow(net::URLRequestContextGetter* request_context, | 53 GCDBaseApiFlow(net::URLRequestContextGetter* request_context, |
54 OAuth2TokenService* token_service, | 54 OAuth2TokenService* token_service, |
55 const std::string& account_id, | 55 const std::string& account_id, |
56 const GURL& automated_claim_url, | 56 const GURL& url, |
57 Delegate* delegate); | 57 Delegate* delegate); |
58 | 58 |
59 // Create a cookie-based confirmation. | 59 // Create a cookie-based confirmation. |
60 GCDBaseApiFlow(net::URLRequestContextGetter* request_context, | 60 GCDBaseApiFlow(net::URLRequestContextGetter* request_context, |
61 int user_index, | 61 int user_index, |
62 const std::string& xsrf_token, | 62 const std::string& xsrf_token, |
63 const GURL& automated_claim_url, | 63 const GURL& url, |
64 Delegate* delegate); | 64 Delegate* delegate); |
65 | 65 |
66 // Create a cookie-based confirmation with no XSRF token (for requests that | 66 // Create a cookie-based confirmation with no XSRF token (for requests that |
67 // don't need an XSRF token). | 67 // don't need an XSRF token). |
68 GCDBaseApiFlow(net::URLRequestContextGetter* request_context, | 68 GCDBaseApiFlow(net::URLRequestContextGetter* request_context, |
69 int user_index, | 69 int user_index, |
70 const GURL& automated_claim_url, | 70 const GURL& url, |
71 Delegate* delegate); | 71 Delegate* delegate); |
72 | 72 |
73 virtual ~GCDBaseApiFlow(); | 73 virtual ~GCDBaseApiFlow(); |
74 | 74 |
75 void Start(); | 75 void Start(); |
76 | 76 |
77 // net::URLFetcherDelegate implementation: | 77 // net::URLFetcherDelegate implementation: |
78 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 78 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
79 | 79 |
80 // OAuth2TokenService::Consumer implementation: | 80 // OAuth2TokenService::Consumer implementation: |
(...skipping 11 matching lines...) Expand all Loading... |
92 scoped_refptr<net::URLRequestContextGetter> request_context_; | 92 scoped_refptr<net::URLRequestContextGetter> request_context_; |
93 OAuth2TokenService* token_service_; | 93 OAuth2TokenService* token_service_; |
94 std::string account_id_; | 94 std::string account_id_; |
95 GURL url_; | 95 GURL url_; |
96 Delegate* delegate_; | 96 Delegate* delegate_; |
97 }; | 97 }; |
98 | 98 |
99 } // namespace local_discovery | 99 } // namespace local_discovery |
100 | 100 |
101 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_GCD_BASE_API_FLOW_H_ | 101 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_GCD_BASE_API_FLOW_H_ |
OLD | NEW |