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" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 return true; | 108 return true; |
109 } | 109 } |
110 | 110 |
111 content::ResourceDispatcherHostLoginDelegate* | 111 content::ResourceDispatcherHostLoginDelegate* |
112 AwResourceDispatcherHostDelegate::CreateLoginDelegate( | 112 AwResourceDispatcherHostDelegate::CreateLoginDelegate( |
113 net::AuthChallengeInfo* auth_info, | 113 net::AuthChallengeInfo* auth_info, |
114 net::URLRequest* request) { | 114 net::URLRequest* request) { |
115 return new AwLoginDelegate(auth_info, request); | 115 return new AwLoginDelegate(auth_info, request); |
116 } | 116 } |
117 | 117 |
118 void AwResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url, | 118 bool AwResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url, |
119 int child_id, | 119 int child_id, |
120 int route_id) { | 120 int route_id) { |
121 // The AwURLRequestJobFactory implementation should ensure this method never | 121 // The AwURLRequestJobFactory implementation should ensure this method never |
122 // gets called. | 122 // gets called. |
123 NOTREACHED(); | 123 NOTREACHED(); |
| 124 return false; |
124 } | 125 } |
125 | 126 |
126 void AwResourceDispatcherHostDelegate::SetOnlyAllowLoadFromCache( | 127 void AwResourceDispatcherHostDelegate::SetOnlyAllowLoadFromCache( |
127 net::URLRequest* request) { | 128 net::URLRequest* request) { |
128 int load_flags = request->load_flags(); | 129 int load_flags = request->load_flags(); |
129 load_flags &= ~(net::LOAD_BYPASS_CACHE & | 130 load_flags &= ~(net::LOAD_BYPASS_CACHE & |
130 net::LOAD_VALIDATE_CACHE & | 131 net::LOAD_VALIDATE_CACHE & |
131 net::LOAD_PREFERRING_CACHE); | 132 net::LOAD_PREFERRING_CACHE); |
132 load_flags |= net::LOAD_ONLY_FROM_CACHE; | 133 load_flags |= net::LOAD_ONLY_FROM_CACHE; |
133 request->set_load_flags(load_flags); | 134 request->set_load_flags(load_flags); |
134 } | 135 } |
135 | 136 |
136 } | 137 } |
OLD | NEW |