| 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_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ |
| 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ | 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 virtual void OnGCDApiFlowComplete(const base::DictionaryValue& value) = 0; | 40 virtual void OnGCDApiFlowComplete(const base::DictionaryValue& value) = 0; |
| 41 | 41 |
| 42 virtual GURL GetURL() = 0; | 42 virtual GURL GetURL() = 0; |
| 43 | 43 |
| 44 virtual std::string GetOAuthScope() = 0; | 44 virtual std::string GetOAuthScope() = 0; |
| 45 | 45 |
| 46 virtual net::URLFetcher::RequestType GetRequestType(); | 46 virtual net::URLFetcher::RequestType GetRequestType(); |
| 47 | 47 |
| 48 virtual std::vector<std::string> GetExtraRequestHeaders() = 0; | 48 virtual std::vector<std::string> GetExtraRequestHeaders() = 0; |
| 49 | 49 |
| 50 // If there is no data, set upload_type and upload_data to "" | |
| 51 virtual void GetUploadData(std::string* upload_type, | |
| 52 std::string* upload_data); | |
| 53 | |
| 54 private: | 50 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(Request); | 51 DISALLOW_COPY_AND_ASSIGN(Request); |
| 56 }; | 52 }; |
| 57 | 53 |
| 58 GCDApiFlow(); | 54 GCDApiFlow(); |
| 59 virtual ~GCDApiFlow(); | 55 virtual ~GCDApiFlow(); |
| 60 | 56 |
| 61 static std::unique_ptr<GCDApiFlow> Create( | 57 static std::unique_ptr<GCDApiFlow> Create( |
| 62 net::URLRequestContextGetter* request_context, | 58 net::URLRequestContextGetter* request_context, |
| 63 OAuth2TokenService* token_service, | 59 OAuth2TokenService* token_service, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 78 std::string GetOAuthScope() override; | 74 std::string GetOAuthScope() override; |
| 79 std::vector<std::string> GetExtraRequestHeaders() override; | 75 std::vector<std::string> GetExtraRequestHeaders() override; |
| 80 | 76 |
| 81 private: | 77 private: |
| 82 DISALLOW_COPY_AND_ASSIGN(CloudPrintApiFlowRequest); | 78 DISALLOW_COPY_AND_ASSIGN(CloudPrintApiFlowRequest); |
| 83 }; | 79 }; |
| 84 | 80 |
| 85 } // namespace cloud_print | 81 } // namespace cloud_print |
| 86 | 82 |
| 87 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ | 83 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ |
| OLD | NEW |