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

Unified Diff: cloud_print/service/service_state.cc

Issue 11439008: net: Change argument of URLRequest::set_upload from UploadData to UploadDataStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@chunk
Patch Set: Fix android Created 8 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 side-by-side diff with in-line comments
Download patch
Index: cloud_print/service/service_state.cc
diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc
index 73b3966cad1e979c93f75e3ee0ed8c14dd27482a..adceef1658ec6b5836244193ca965e7242f01423 100644
--- a/cloud_print/service/service_state.cc
+++ b/cloud_print/service/service_state.cc
@@ -13,7 +13,8 @@
#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/base/upload_bytes_element_reader.h"
+#include "net/base/upload_data_stream.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"
@@ -179,9 +180,10 @@ std::string ServiceState::LoginToGoogle(const std::string& service,
load_flags = load_flags | net::LOAD_DO_NOT_SAVE_COOKIES;
request.set_load_flags(load_flags);
- scoped_refptr<net::UploadData> upload_data(new net::UploadData());
- upload_data->AppendBytes(post_body.c_str(), post_body.size());
- request.set_upload(upload_data);
+ scoped_ptr<net::UploadElementReader> reader(
+ net::UploadOwnedBytesElementReader::CreateWithString(post_body));
+ request.set_upload(make_scoped_ptr(
+ net::UploadDataStream::CreateWithReader(reader.Pass(), 0)));
request.SetExtraRequestHeaderByName(
"Content-Type", "application/x-www-form-urlencoded", true);
request.set_method("POST");
« no previous file with comments | « chrome/browser/net/chrome_fraudulent_certificate_reporter.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698