| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 const char* IoThreadClientThrottle::GetNameForLogging() const { | 98 const char* IoThreadClientThrottle::GetNameForLogging() const { |
| 99 return "IoThreadClientThrottle"; | 99 return "IoThreadClientThrottle"; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void IoThreadClientThrottle::WillStartRequest(bool* defer) { | 102 void IoThreadClientThrottle::WillStartRequest(bool* defer) { |
| 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 104 // TODO(sgurun): This block can be removed when crbug.com/277937 is fixed. | 104 // TODO(sgurun): This block can be removed when crbug.com/277937 is fixed. |
| 105 if (render_frame_id_ < 1) { | 105 if (render_frame_id_ < 1) { |
| 106 // OPTIONS is used for preflighted requests which are generated internally. | 106 // OPTIONS is used for preflighted requests which are generated internally. |
| 107 DCHECK_EQ("OPTIONS", request_->method()); | 107 // DCHECK_EQ("OPTIONS", request_->method()); |
| 108 return; | 108 return; |
| 109 } | 109 } |
| 110 DCHECK(render_process_id_); | 110 DCHECK(render_process_id_); |
| 111 *defer = false; | 111 *defer = false; |
| 112 | 112 |
| 113 // Defer all requests of a pop up that is still not associated with Java | 113 // Defer all requests of a pop up that is still not associated with Java |
| 114 // client so that the client will get a chance to override requests. | 114 // client so that the client will get a chance to override requests. |
| 115 scoped_ptr<AwContentsIoThreadClient> io_client = | 115 scoped_ptr<AwContentsIoThreadClient> io_client = |
| 116 AwContentsIoThreadClient::FromID(render_process_id_, render_frame_id_); | 116 AwContentsIoThreadClient::FromID(render_process_id_, render_frame_id_); |
| 117 if (io_client && io_client->PendingAssociation()) { | 117 if (io_client && io_client->PendingAssociation()) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 net::HttpRequestHeaders headers; | 421 net::HttpRequestHeaders headers; |
| 422 headers.AddHeadersFromString(extra_headers); | 422 headers.AddHeadersFromString(extra_headers); |
| 423 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { | 423 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { |
| 424 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); | 424 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); |
| 425 } | 425 } |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 } | 428 } |
| 429 | 429 |
| 430 } // namespace android_webview | 430 } // namespace android_webview |
| OLD | NEW |