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

Unified Diff: content/test/net/url_request_user_data_helper.cc

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix layering problem with unittest Created 8 years, 7 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: content/test/net/url_request_user_data_helper.cc
diff --git a/content/test/net/url_request_user_data_helper.cc b/content/test/net/url_request_user_data_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..884c848c04862f9a1b906ca7bf4cff7948a17114
--- /dev/null
+++ b/content/test/net/url_request_user_data_helper.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/test/net/url_request_user_data_helper.h"
+
+#include "content/common/net/url_request_user_data.h"
+#include "ipc/ipc_message.h"
+#include "net/url_request/url_request.h"
+
+void URLRequestUserDataHelper::AssociateWithRenderView(
+ net::URLRequest* request,
+ int render_process_id,
+ int render_view_id) {
+ DCHECK(render_process_id != MSG_ROUTING_NONE);
+ DCHECK(render_view_id != MSG_ROUTING_NONE);
+
+ request->SetUserData(URLRequestUserData::kUserDataKey,
+ new URLRequestUserData(render_process_id,
+ render_view_id));
+}
+
+void URLRequestUserDataHelper::DissasociateFromRenderView(
+ net::URLRequest* request) {
+ request->SetUserData(URLRequestUserData::kUserDataKey, NULL);
+}

Powered by Google App Engine
This is Rietveld 408576698