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

Side by Side Diff: android_webview/browser/net/aw_network_delegate.cc

Issue 2888623004: [WebView] Merge AwContentsClientBridgeBase into AwContentsClientBridge (Closed)
Patch Set: Created 3 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
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/net/aw_network_delegate.h" 5 #include "android_webview/browser/net/aw_network_delegate.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_contents_client_bridge_base.h" 8 #include "android_webview/browser/aw_contents_client_bridge.h"
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_cookie_access_policy.h" 10 #include "android_webview/browser/aw_cookie_access_policy.h"
11 #include "android_webview/browser/net/aw_web_resource_request.h" 11 #include "android_webview/browser/net/aw_web_resource_request.h"
12 #include "base/android/build_info.h" 12 #include "base/android/build_info.h"
13 #include "components/policy/core/browser/url_blacklist_manager.h" 13 #include "components/policy/core/browser/url_blacklist_manager.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/resource_request_info.h" 15 #include "content/public/browser/resource_request_info.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
18 #include "net/http/http_response_headers.h" 18 #include "net/http/http_response_headers.h"
19 #include "net/proxy/proxy_info.h" 19 #include "net/proxy/proxy_info.h"
20 #include "net/proxy/proxy_server.h" 20 #include "net/proxy/proxy_server.h"
21 #include "net/url_request/url_request.h" 21 #include "net/url_request/url_request.h"
22 22
23 using content::BrowserThread; 23 using content::BrowserThread;
24 24
25 namespace android_webview { 25 namespace android_webview {
26 26
27 namespace { 27 namespace {
28 28
29 void OnReceivedHttpErrorOnUiThread( 29 void OnReceivedHttpErrorOnUiThread(
30 const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, 30 const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
31 const AwWebResourceRequest& request, 31 const AwWebResourceRequest& request,
32 scoped_refptr<const net::HttpResponseHeaders> original_response_headers) { 32 scoped_refptr<const net::HttpResponseHeaders> original_response_headers) {
33 AwContentsClientBridgeBase* client = 33 AwContentsClientBridge* client =
34 AwContentsClientBridgeBase::FromWebContentsGetter(web_contents_getter); 34 AwContentsClientBridge::FromWebContentsGetter(web_contents_getter);
35 if (!client) { 35 if (!client) {
36 DLOG(WARNING) << "client is null, onReceivedHttpError dropped for " 36 DLOG(WARNING) << "client is null, onReceivedHttpError dropped for "
37 << request.url; 37 << request.url;
38 return; 38 return;
39 } 39 }
40 client->OnReceivedHttpError(request, original_response_headers); 40 client->OnReceivedHttpError(request, original_response_headers);
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 cookie_line, 146 cookie_line,
147 options); 147 options);
148 } 148 }
149 149
150 bool AwNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, 150 bool AwNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
151 const base::FilePath& path) const { 151 const base::FilePath& path) const {
152 return true; 152 return true;
153 } 153 }
154 154
155 } // namespace android_webview 155 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698