OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 5 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
6 | 6 |
7 #include "android_webview/browser/aw_login_delegate.h" | 7 #include "android_webview/browser/aw_login_delegate.h" |
8 #include "android_webview/browser/aw_contents_io_thread_client.h" | 8 #include "android_webview/browser/aw_contents_io_thread_client.h" |
9 #include "android_webview/common/url_constants.h" | 9 #include "android_webview/common/url_constants.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "chrome/browser/component/navigation_interception/intercept_navigation_
delegate.h" | 12 #include "content/components/navigation_interception/intercept_navigation_delega
te.h" |
13 #include "content/public/browser/resource_controller.h" | 13 #include "content/public/browser/resource_controller.h" |
14 #include "content/public/browser/resource_dispatcher_host.h" | 14 #include "content/public/browser/resource_dispatcher_host.h" |
15 #include "content/public/browser/resource_dispatcher_host_login_delegate.h" | 15 #include "content/public/browser/resource_dispatcher_host_login_delegate.h" |
16 #include "content/public/browser/resource_throttle.h" | 16 #include "content/public/browser/resource_throttle.h" |
17 #include "content/public/common/url_constants.h" | 17 #include "content/public/common/url_constants.h" |
18 #include "net/base/load_flags.h" | 18 #include "net/base/load_flags.h" |
19 #include "net/url_request/url_request.h" | 19 #include "net/url_request/url_request.h" |
20 | 20 |
21 using navigation_interception::InterceptNavigationDelegate; | 21 using content::InterceptNavigationDelegate; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 base::LazyInstance<android_webview::AwResourceDispatcherHostDelegate> | 25 base::LazyInstance<android_webview::AwResourceDispatcherHostDelegate> |
26 g_webview_resource_dispatcher_host_delegate = LAZY_INSTANCE_INITIALIZER; | 26 g_webview_resource_dispatcher_host_delegate = LAZY_INSTANCE_INITIALIZER; |
27 | 27 |
28 // Will unconditionally cancel this resource request. | 28 // Will unconditionally cancel this resource request. |
29 class CancelResourceThrottle : public content::ResourceThrottle { | 29 class CancelResourceThrottle : public content::ResourceThrottle { |
30 public: | 30 public: |
31 virtual void WillStartRequest(bool* defer) OVERRIDE; | 31 virtual void WillStartRequest(bool* defer) OVERRIDE; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 net::URLRequest* request) { | 128 net::URLRequest* request) { |
129 int load_flags = request->load_flags(); | 129 int load_flags = request->load_flags(); |
130 load_flags &= ~(net::LOAD_BYPASS_CACHE & | 130 load_flags &= ~(net::LOAD_BYPASS_CACHE & |
131 net::LOAD_VALIDATE_CACHE & | 131 net::LOAD_VALIDATE_CACHE & |
132 net::LOAD_PREFERRING_CACHE); | 132 net::LOAD_PREFERRING_CACHE); |
133 load_flags |= net::LOAD_ONLY_FROM_CACHE; | 133 load_flags |= net::LOAD_ONLY_FROM_CACHE; |
134 request->set_load_flags(load_flags); | 134 request->set_load_flags(load_flags); |
135 } | 135 } |
136 | 136 |
137 } | 137 } |
OLD | NEW |