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

Unified Diff: content/shell/browser/layout_test/layout_test_url_request_context_getter.cc

Issue 651883002: Content Shell: Introduce LayoutTestURLRequestContextGetter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@LayoutTestBrowserMainParts
Patch Set: Fix. Created 6 years, 2 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/shell/browser/layout_test/layout_test_url_request_context_getter.cc
diff --git a/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc b/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..506ce547c045e03303bebfd5f478263e432e9dda
--- /dev/null
+++ b/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc
@@ -0,0 +1,52 @@
+// Copyright 2013 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/shell/browser/layout_test/layout_test_url_request_context_getter.h"
+
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/shell/browser/shell_network_delegate.h"
+#include "net/proxy/proxy_service.h"
+
+namespace content {
+
+LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter(
+ bool ignore_certificate_errors,
+ const base::FilePath& base_path,
+ base::MessageLoop* io_loop,
+ base::MessageLoop* file_loop,
+ ProtocolHandlerMap* protocol_handlers,
+ URLRequestInterceptorScopedVector request_interceptors,
+ net::NetLog* net_log)
+ : ShellURLRequestContextGetter(ignore_certificate_errors,
+ base_path,
+ io_loop,
+ file_loop,
+ protocol_handlers,
+ request_interceptors.Pass(),
+ net_log) {
+ // Must first be created on the UI thread.
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+}
+
+LayoutTestURLRequestContextGetter::~LayoutTestURLRequestContextGetter() {
+}
+
+net::NetworkDelegate*
+LayoutTestURLRequestContextGetter::CreateNetworkDelegate() {
+ ShellNetworkDelegate::SetAcceptAllCookies(false);
+ return new ShellNetworkDelegate;
+}
+
+net::ProxyConfigService*
+LayoutTestURLRequestContextGetter::GetProxyConfigService() {
+ return nullptr;
+}
+
+net::ProxyService* LayoutTestURLRequestContextGetter::GetProxyService() {
+ return net::ProxyService::CreateDirect();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698