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 <string> | 7 #include <string> |
8 | 8 |
9 #include "android_webview/browser/aw_contents_io_thread_client.h" | 9 #include "android_webview/browser/aw_contents_io_thread_client.h" |
10 #include "android_webview/browser/aw_login_delegate.h" | 10 #include "android_webview/browser/aw_login_delegate.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/public/browser/resource_request_info.h" | 21 #include "content/public/browser/resource_request_info.h" |
22 #include "content/public/browser/resource_throttle.h" | 22 #include "content/public/browser/resource_throttle.h" |
23 #include "net/base/load_flags.h" | 23 #include "net/base/load_flags.h" |
24 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
25 #include "net/http/http_response_headers.h" | 25 #include "net/http/http_response_headers.h" |
26 #include "net/url_request/url_request.h" | 26 #include "net/url_request/url_request.h" |
27 #include "url/url_constants.h" | 27 #include "url/url_constants.h" |
28 | 28 |
29 using android_webview::AwContentsIoThreadClient; | 29 using android_webview::AwContentsIoThreadClient; |
30 using content::BrowserThread; | 30 using content::BrowserThread; |
| 31 using content::ResourceType; |
31 using navigation_interception::InterceptNavigationDelegate; | 32 using navigation_interception::InterceptNavigationDelegate; |
32 | 33 |
33 namespace { | 34 namespace { |
34 | 35 |
35 base::LazyInstance<android_webview::AwResourceDispatcherHostDelegate> | 36 base::LazyInstance<android_webview::AwResourceDispatcherHostDelegate> |
36 g_webview_resource_dispatcher_host_delegate = LAZY_INSTANCE_INITIALIZER; | 37 g_webview_resource_dispatcher_host_delegate = LAZY_INSTANCE_INITIALIZER; |
37 | 38 |
38 void SetCacheControlFlag( | 39 void SetCacheControlFlag( |
39 net::URLRequest* request, int flag) { | 40 net::URLRequest* request, int flag) { |
40 const int all_cache_control_flags = net::LOAD_BYPASS_CACHE | | 41 const int all_cache_control_flags = net::LOAD_BYPASS_CACHE | |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 net::HttpRequestHeaders headers; | 422 net::HttpRequestHeaders headers; |
422 headers.AddHeadersFromString(extra_headers); | 423 headers.AddHeadersFromString(extra_headers); |
423 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { | 424 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { |
424 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); | 425 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); |
425 } | 426 } |
426 } | 427 } |
427 } | 428 } |
428 } | 429 } |
429 | 430 |
430 } // namespace android_webview | 431 } // namespace android_webview |
OLD | NEW |