summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 04:58:38 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 04:58:38 +0000
commit5a61b2c39d2e45c9227d13b68f09a87354590d83 (patch)
tree7285d9d4abfbccf031e226efa6c38a162d24ca8b /cloud_print
parent5baf5a0afc5183a8fddaf903017751c00ff51795 (diff)
downloadchromium_src-5a61b2c39d2e45c9227d13b68f09a87354590d83.zip
chromium_src-5a61b2c39d2e45c9227d13b68f09a87354590d83.tar.gz
chromium_src-5a61b2c39d2e45c9227d13b68f09a87354590d83.tar.bz2
Stop using URLRequest::AppendBytesToUpload from ServiceState
AppendBytesToUpload will be soon deleted. It can be easily replaced with set_upload() BUG=161708 TEST=git try Review URL: https://chromiumcodereview.appspot.com/11308088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/service/service_state.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc
index 29298d2..73b3966 100644
--- a/cloud_print/service/service_state.cc
+++ b/cloud_print/service/service_state.cc
@@ -13,6 +13,7 @@
#include "net/base/escape.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
+#include "net/base/upload_data.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
@@ -178,7 +179,9 @@ std::string ServiceState::LoginToGoogle(const std::string& service,
load_flags = load_flags | net::LOAD_DO_NOT_SAVE_COOKIES;
request.set_load_flags(load_flags);
- request.AppendBytesToUpload(post_body.c_str(), post_body.size());
+ scoped_refptr<net::UploadData> upload_data(new net::UploadData());
+ upload_data->AppendBytes(post_body.c_str(), post_body.size());
+ request.set_upload(upload_data);
request.SetExtraRequestHeaderByName(
"Content-Type", "application/x-www-form-urlencoded", true);
request.set_method("POST");