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

Unified Diff: headless/test/test_protocol_handler.cc

Issue 2092773002: headless: Allow per-context protocol handlers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments Created 4 years, 6 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
« no previous file with comments | « headless/test/test_protocol_handler.h ('k') | headless/test/test_url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/test/test_protocol_handler.cc
diff --git a/headless/test/test_protocol_handler.cc b/headless/test/test_protocol_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4752f91b3417e6c075d3227f3f11ab2798b8cb37
--- /dev/null
+++ b/headless/test/test_protocol_handler.cc
@@ -0,0 +1,20 @@
+// Copyright 2016 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 "headless/test/test_protocol_handler.h"
+
+#include "headless/test/test_url_request_job.h"
+
+namespace headless {
+
+TestProtocolHandler::TestProtocolHandler(const std::string& body)
+ : body_(body) {}
+
+net::URLRequestJob* TestProtocolHandler::MaybeCreateJob(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const {
+ return new TestURLRequestJob(request, network_delegate, body_);
+}
+
+} // namespace headless
« no previous file with comments | « headless/test/test_protocol_handler.h ('k') | headless/test/test_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698