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

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

Issue 1013843002: favor DCHECK_CURRENTLY_ON for better logs in android_webview/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change a few more Created 5 years, 9 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_contents_io_thread_client.h" 7 #include "android_webview/browser/aw_contents_io_thread_client.h"
8 #include "android_webview/browser/aw_cookie_access_policy.h" 8 #include "android_webview/browser/aw_cookie_access_policy.h"
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void AwNetworkDelegate::OnSendHeaders(net::URLRequest* request, 48 void AwNetworkDelegate::OnSendHeaders(net::URLRequest* request,
49 const net::HttpRequestHeaders& headers) { 49 const net::HttpRequestHeaders& headers) {
50 } 50 }
51 51
52 int AwNetworkDelegate::OnHeadersReceived( 52 int AwNetworkDelegate::OnHeadersReceived(
53 net::URLRequest* request, 53 net::URLRequest* request,
54 const net::CompletionCallback& callback, 54 const net::CompletionCallback& callback,
55 const net::HttpResponseHeaders* original_response_headers, 55 const net::HttpResponseHeaders* original_response_headers,
56 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, 56 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
57 GURL* allowed_unsafe_redirect_url) { 57 GURL* allowed_unsafe_redirect_url) {
58 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 58 DCHECK_CURRENTLY_ON(BrowserThread::IO);
59 int render_process_id, render_frame_id; 59 int render_process_id, render_frame_id;
60 if (original_response_headers->response_code() >= 400 && 60 if (original_response_headers->response_code() >= 400 &&
61 content::ResourceRequestInfo::GetRenderFrameForRequest( 61 content::ResourceRequestInfo::GetRenderFrameForRequest(
62 request, &render_process_id, &render_frame_id)) { 62 request, &render_process_id, &render_frame_id)) {
63 scoped_ptr<AwContentsIoThreadClient> io_thread_client = 63 scoped_ptr<AwContentsIoThreadClient> io_thread_client =
64 AwContentsIoThreadClient::FromID(render_process_id, render_frame_id); 64 AwContentsIoThreadClient::FromID(render_process_id, render_frame_id);
65 if (io_thread_client.get()) { 65 if (io_thread_client.get()) {
66 io_thread_client->OnReceivedHttpError(request, original_response_headers); 66 io_thread_client->OnReceivedHttpError(request, original_response_headers);
67 } 67 }
68 } 68 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const base::FilePath& path) const { 116 const base::FilePath& path) const {
117 return true; 117 return true;
118 } 118 }
119 119
120 bool AwNetworkDelegate::OnCanThrottleRequest( 120 bool AwNetworkDelegate::OnCanThrottleRequest(
121 const net::URLRequest& request) const { 121 const net::URLRequest& request) const {
122 return false; 122 return false;
123 } 123 }
124 124
125 } // namespace android_webview 125 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/icon_helper.cc ('k') | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698