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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/content_resource_dispatcher_host.h"
6
7 #include "base/logging.h"
8 #include "content/browser/loader/resource_dispatcher_host_impl.h"
9
10 namespace content {
11
12 namespace {
13
14 static ContentResourceDispatcherHost* g_content_resource_dispatcher_host;
15
16 } // namespace
17
18 // static
19 ResourceDispatcherHost* ResourceDispatcherHost::Get() {
20 return g_content_resource_dispatcher_host;
21 }
22
23 ContentResourceDispatcherHost::ContentResourceDispatcherHost()
24 : child_(nullptr),
25 content_resource_dispatcher_host_delegate_(
26 new ContentResourceDispatcherHostDelegate()) {
27 DCHECK(!g_content_resource_dispatcher_host);
28 g_content_resource_dispatcher_host = this;
29 }
30
31 ContentResourceDispatcherHost::~ContentResourceDispatcherHost() {
32 DCHECK(g_content_resource_dispatcher_host);
33 g_content_resource_dispatcher_host = nullptr;
34 }
35
36 void ContentResourceDispatcherHost::SetChild(
37 ResourceDispatcherHostImpl* child) {
38 child_ = child;
39 }
40
41 void ContentResourceDispatcherHost::SetDelegate(
42 ResourceDispatcherHostDelegate* delegate) {
43 content_resource_dispatcher_host_delegate_->SetChild(delegate);
44 child_->SetDelegate(content_resource_dispatcher_host_delegate_.get());
45 }
46
47 void ContentResourceDispatcherHost::SetAllowCrossOriginAuthPrompt(bool value) {
48 child_->SetAllowCrossOriginAuthPrompt(value);
49 }
50
51 void ContentResourceDispatcherHost::ClearLoginDelegateForRequest(
52 net::URLRequest* request) {
53 child_->ClearLoginDelegateForRequest(request);
54 }
55
56 } // namespace content
OLDNEW
« 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