Home | History | Annotate | Download | only in local_discovery
      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 
     14 GCDApiFlow::Request::Request() {
     15 }
     16 
     17 GCDApiFlow::Request::~Request() {
     18 }
     19 
     20 net::URLFetcher::RequestType GCDApiFlow::Request::GetRequestType() {
     21   return net::URLFetcher::GET;
     22 }
     23 
     24 void GCDApiFlow::Request::GetUploadData(std::string* upload_type,
     25                                         std::string* upload_data) {
     26   *upload_type = std::string();
     27   *upload_data = std::string();
     28 }
     29 
     30 scoped_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 
     38 GCDApiFlow::GCDApiFlow() {
     39 }
     40 
     41 GCDApiFlow::~GCDApiFlow() {
     42 }
     43 
     44 GCDApiFlowRequest::GCDApiFlowRequest() {
     45 }
     46 
     47 GCDApiFlowRequest::~GCDApiFlowRequest() {
     48 }
     49 
     50 std::string GCDApiFlowRequest::GetOAuthScope() {
     51   return cloud_devices::kCloudDevicesAuthScope;
     52 }
     53 
     54 std::vector<std::string> GCDApiFlowRequest::GetExtraRequestHeaders() {
     55   return std::vector<std::string>();
     56 }
     57 
     58 CloudPrintApiFlowRequest::CloudPrintApiFlowRequest() {
     59 }
     60 
     61 CloudPrintApiFlowRequest::~CloudPrintApiFlowRequest() {
     62 }
     63 
     64 std::string CloudPrintApiFlowRequest::GetOAuthScope() {
     65   return cloud_devices::kCloudPrintAuthScope;
     66 }
     67 
     68 std::vector<std::string> CloudPrintApiFlowRequest::GetExtraRequestHeaders() {
     69   return std::vector<std::string>(1, cloud_print::kChromeCloudPrintProxyHeader);
     70 }
     71 
     72 }  // namespace local_discovery
     73