Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: chrome/service/cloud_print/cloud_print_url_fetcher.cc

Issue 5624002: Move more code from headers to implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/service/cloud_print/cloud_print_url_fetcher.h" 5 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/common/net/http_return.h" 9 #include "chrome/common/net/http_return.h"
10 #include "chrome/service/cloud_print/cloud_print_consts.h" 10 #include "chrome/service/cloud_print/cloud_print_consts.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 headers += "\r\n"; 126 headers += "\r\n";
127 headers += kChromeCloudPrintProxyHeader; 127 headers += kChromeCloudPrintProxyHeader;
128 request_->set_extra_request_headers(headers); 128 request_->set_extra_request_headers(headers);
129 if (request_type == URLFetcher::POST) { 129 if (request_type == URLFetcher::POST) {
130 request_->set_upload_data(post_data_mime_type, post_data); 130 request_->set_upload_data(post_data_mime_type, post_data);
131 } 131 }
132 132
133 request_->Start(); 133 request_->Start();
134 } 134 }
135 135
136 CloudPrintURLFetcher::~CloudPrintURLFetcher() {}
137
136 URLRequestContextGetter* CloudPrintURLFetcher::GetRequestContextGetter() { 138 URLRequestContextGetter* CloudPrintURLFetcher::GetRequestContextGetter() {
137 ServiceURLRequestContextGetter* getter = 139 ServiceURLRequestContextGetter* getter =
138 new ServiceURLRequestContextGetter(); 140 new ServiceURLRequestContextGetter();
139 // Now set up the user agent for cloudprint. 141 // Now set up the user agent for cloudprint.
140 std::string user_agent = getter->user_agent(); 142 std::string user_agent = getter->user_agent();
141 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); 143 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent);
142 getter->set_user_agent(user_agent); 144 getter->set_user_agent(user_agent);
143 return getter; 145 return getter;
144 } 146 }
145 147
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698