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