OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/automation/url_request_automation_job.h" | 5 #include "chrome/browser/automation/url_request_automation_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "chrome/browser/automation/automation_resource_message_filter.h" | 11 #include "chrome/browser/automation/automation_resource_message_filter.h" |
12 #include "chrome/common/automation_messages.h" | 12 #include "chrome/common/automation_messages.h" |
13 #include "content/browser/renderer_host/render_view_host.h" | 13 #include "content/browser/renderer_host/render_view_host.h" |
14 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 14 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
15 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 15 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "net/base/cookie_monster.h" | 17 #include "net/base/cookie_monster.h" |
18 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
19 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/http/http_request_headers.h" | 21 #include "net/http/http_request_headers.h" |
22 #include "net/http/http_response_headers.h" | 22 #include "net/http/http_response_headers.h" |
23 #include "net/http/http_util.h" | 23 #include "net/http/http_util.h" |
24 #include "net/url_request/url_request_context.h" | 24 #include "net/url_request/url_request_context.h" |
25 | 25 |
26 using base::Time; | 26 using base::Time; |
27 using base::TimeDelta; | 27 using base::TimeDelta; |
| 28 using content::BrowserThread; |
28 | 29 |
29 // The list of filtered headers that are removed from requests sent via | 30 // The list of filtered headers that are removed from requests sent via |
30 // StartAsync(). These must be lower case. | 31 // StartAsync(). These must be lower case. |
31 static const char* const kFilteredHeaderStrings[] = { | 32 static const char* const kFilteredHeaderStrings[] = { |
32 "connection", | 33 "connection", |
33 "cookie", | 34 "cookie", |
34 "expect", | 35 "expect", |
35 "max-forwards", | 36 "max-forwards", |
36 "proxy-authorization", | 37 "proxy-authorization", |
37 "referer", | 38 "referer", |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 if (!is_done()) { | 489 if (!is_done()) { |
489 NotifyDone(request_status_); | 490 NotifyDone(request_status_); |
490 } | 491 } |
491 // Reset any pending reads. | 492 // Reset any pending reads. |
492 if (pending_buf_) { | 493 if (pending_buf_) { |
493 pending_buf_ = NULL; | 494 pending_buf_ = NULL; |
494 pending_buf_size_ = 0; | 495 pending_buf_size_ = 0; |
495 NotifyReadComplete(0); | 496 NotifyReadComplete(0); |
496 } | 497 } |
497 } | 498 } |
OLD | NEW |