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

Unified Diff: mojo/services/html_viewer/weburlloader_impl.cc

Issue 453133002: Mojo: Generalize blink::URLRequest -> mojo::URLRequest conversion, and use it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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: mojo/services/html_viewer/weburlloader_impl.cc
diff --git a/mojo/services/html_viewer/weburlloader_impl.cc b/mojo/services/html_viewer/weburlloader_impl.cc
index 16f5950c2a6cf9b4b0d580f1957244f8d3a13fe3..c4b0adb387a3540e39484f687b6d5a999ba3aaab 100644
--- a/mojo/services/html_viewer/weburlloader_impl.cc
+++ b/mojo/services/html_viewer/weburlloader_impl.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/thread_task_runner_handle.h"
#include "mojo/common/common_type_converters.h"
+#include "mojo/services/html_viewer/blink_url_request_type_converters.h"
#include "mojo/services/public/interfaces/network/network_service.mojom.h"
#include "net/base/net_errors.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -65,11 +66,9 @@ void WebURLLoaderImpl::loadAsynchronously(const blink::WebURLRequest& request,
client_ = client;
url_ = request.url();
- URLRequestPtr url_request(URLRequest::New());
- url_request->url = String::From(url_);
- url_request->method = request.httpMethod().utf8();
+ URLRequestPtr url_request =
+ TypeConverter<URLRequestPtr, blink::WebURLRequest>::ConvertFrom(request);
darin (slow to review) 2014/08/12 16:23:12 nit: URLRequest::From(request)
Matt Perry 2014/08/12 18:42:53 Done.
url_request->auto_follow_redirects = false;
- // TODO(darin): Copy other fields.
if (request.extraData()) {
WebURLRequestExtraData* extra_data =

Powered by Google App Engine
This is Rietveld 408576698