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

Unified Diff: content/browser/content_resource_dispatcher_host.cc

Issue 1960743002: Remove dependency of AsyncResourceLoader on content/browser/host_zoom_map_impl.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devtoolsnetlog-loader
Patch Set: missed override Created 4 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/browser/content_resource_dispatcher_host.cc
diff --git a/content/browser/content_resource_dispatcher_host.cc b/content/browser/content_resource_dispatcher_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..693a54a8147f4ad58f2386fac70e2672ed83e24a
--- /dev/null
+++ b/content/browser/content_resource_dispatcher_host.cc
@@ -0,0 +1,56 @@
+// 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 "content/browser/content_resource_dispatcher_host.h"
+
+#include "base/logging.h"
+#include "content/browser/loader/resource_dispatcher_host_impl.h"
+
+namespace content {
+
+namespace {
+
+static ContentResourceDispatcherHost* g_content_resource_dispatcher_host;
+
+} // namespace
+
+// static
+ResourceDispatcherHost* ResourceDispatcherHost::Get() {
+ return g_content_resource_dispatcher_host;
+}
+
+ContentResourceDispatcherHost::ContentResourceDispatcherHost()
+ : child_(nullptr),
+ content_resource_dispatcher_host_delegate_(
+ new ContentResourceDispatcherHostDelegate()) {
+ DCHECK(!g_content_resource_dispatcher_host);
+ g_content_resource_dispatcher_host = this;
+}
+
+ContentResourceDispatcherHost::~ContentResourceDispatcherHost() {
+ DCHECK(g_content_resource_dispatcher_host);
+ g_content_resource_dispatcher_host = nullptr;
+}
+
+void ContentResourceDispatcherHost::SetChild(
+ ResourceDispatcherHostImpl* child) {
+ child_ = child;
+}
+
+void ContentResourceDispatcherHost::SetDelegate(
+ ResourceDispatcherHostDelegate* delegate) {
+ content_resource_dispatcher_host_delegate_->SetChild(delegate);
+ child_->SetDelegate(content_resource_dispatcher_host_delegate_.get());
+}
+
+void ContentResourceDispatcherHost::SetAllowCrossOriginAuthPrompt(bool value) {
+ child_->SetAllowCrossOriginAuthPrompt(value);
+}
+
+void ContentResourceDispatcherHost::ClearLoginDelegateForRequest(
+ net::URLRequest* request) {
+ child_->ClearLoginDelegateForRequest(request);
+}
+
+} // namespace content
« no previous file with comments | « content/browser/content_resource_dispatcher_host.h ('k') | content/browser/content_resource_dispatcher_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698