| 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 #include "chrome/browser/printing/cloud_print/gcd_api_flow.h" | 5 #include "chrome/browser/printing/cloud_print/gcd_api_flow.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "chrome/browser/printing/cloud_print/gcd_api_flow_impl.h" | 9 #include "chrome/browser/printing/cloud_print/gcd_api_flow_impl.h" |
| 10 #include "chrome/browser/printing/cloud_print/gcd_constants.h" | 10 #include "chrome/browser/printing/cloud_print/gcd_constants.h" |
| 11 #include "chrome/common/cloud_print/cloud_print_constants.h" | 11 #include "chrome/common/cloud_print/cloud_print_constants.h" |
| 12 #include "components/cloud_devices/common/cloud_devices_urls.h" | 12 #include "components/cloud_devices/common/cloud_devices_urls.h" |
| 13 | 13 |
| 14 namespace cloud_print { | 14 namespace cloud_print { |
| 15 | 15 |
| 16 GCDApiFlow::Request::Request() { | 16 GCDApiFlow::Request::Request() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 GCDApiFlow::Request::~Request() { | 19 GCDApiFlow::Request::~Request() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 net::URLFetcher::RequestType GCDApiFlow::Request::GetRequestType() { | 22 net::URLFetcher::RequestType GCDApiFlow::Request::GetRequestType() { |
| 23 return net::URLFetcher::GET; | 23 return net::URLFetcher::GET; |
| 24 } | 24 } |
| 25 | 25 |
| 26 void GCDApiFlow::Request::GetUploadData(std::string* upload_type, | |
| 27 std::string* upload_data) { | |
| 28 *upload_type = std::string(); | |
| 29 *upload_data = std::string(); | |
| 30 } | |
| 31 | |
| 32 std::unique_ptr<GCDApiFlow> GCDApiFlow::Create( | 26 std::unique_ptr<GCDApiFlow> GCDApiFlow::Create( |
| 33 net::URLRequestContextGetter* request_context, | 27 net::URLRequestContextGetter* request_context, |
| 34 OAuth2TokenService* token_service, | 28 OAuth2TokenService* token_service, |
| 35 const std::string& account_id) { | 29 const std::string& account_id) { |
| 36 return std::unique_ptr<GCDApiFlow>( | 30 return std::unique_ptr<GCDApiFlow>( |
| 37 new GCDApiFlowImpl(request_context, token_service, account_id)); | 31 new GCDApiFlowImpl(request_context, token_service, account_id)); |
| 38 } | 32 } |
| 39 | 33 |
| 40 GCDApiFlow::GCDApiFlow() { | 34 GCDApiFlow::GCDApiFlow() { |
| 41 } | 35 } |
| 42 | 36 |
| 43 GCDApiFlow::~GCDApiFlow() { | 37 GCDApiFlow::~GCDApiFlow() { |
| 44 } | 38 } |
| 45 | 39 |
| 46 CloudPrintApiFlowRequest::CloudPrintApiFlowRequest() { | 40 CloudPrintApiFlowRequest::CloudPrintApiFlowRequest() { |
| 47 } | 41 } |
| 48 | 42 |
| 49 CloudPrintApiFlowRequest::~CloudPrintApiFlowRequest() { | 43 CloudPrintApiFlowRequest::~CloudPrintApiFlowRequest() { |
| 50 } | 44 } |
| 51 | 45 |
| 52 std::string CloudPrintApiFlowRequest::GetOAuthScope() { | 46 std::string CloudPrintApiFlowRequest::GetOAuthScope() { |
| 53 return cloud_devices::kCloudPrintAuthScope; | 47 return cloud_devices::kCloudPrintAuthScope; |
| 54 } | 48 } |
| 55 | 49 |
| 56 std::vector<std::string> CloudPrintApiFlowRequest::GetExtraRequestHeaders() { | 50 std::vector<std::string> CloudPrintApiFlowRequest::GetExtraRequestHeaders() { |
| 57 return std::vector<std::string>(1, cloud_print::kChromeCloudPrintProxyHeader); | 51 return std::vector<std::string>(1, cloud_print::kChromeCloudPrintProxyHeader); |
| 58 } | 52 } |
| 59 | 53 |
| 60 } // namespace cloud_print | 54 } // namespace cloud_print |
| OLD | NEW |