OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/file_version_info.h" | 11 #include "base/file_version_info.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "net/base/cookie_monster.h" | 14 #include "net/base/cookie_monster.h" |
15 #include "net/base/filter.h" | 15 #include "net/base/filter.h" |
16 #include "net/base/load_flags.h" | 16 #include "net/base/load_flags.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
19 #include "net/base/sdch_manager.h" | 19 #include "net/base/sdch_manager.h" |
| 20 #include "net/http/http_response_headers.h" |
20 #include "net/http/http_response_info.h" | 21 #include "net/http/http_response_info.h" |
21 #include "net/http/http_transaction.h" | 22 #include "net/http/http_transaction.h" |
22 #include "net/http/http_transaction_factory.h" | 23 #include "net/http/http_transaction_factory.h" |
23 #include "net/url_request/url_request.h" | 24 #include "net/url_request/url_request.h" |
| 25 #include "net/url_request/url_request_context.h" |
24 #include "net/url_request/url_request_error_job.h" | 26 #include "net/url_request/url_request_error_job.h" |
25 | 27 |
26 // TODO(darin): make sure the port blocking code is not lost | 28 // TODO(darin): make sure the port blocking code is not lost |
27 | 29 |
28 // static | 30 // static |
29 URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request, | 31 URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request, |
30 const std::string& scheme) { | 32 const std::string& scheme) { |
31 DCHECK(scheme == "http" || scheme == "https"); | 33 DCHECK(scheme == "http" || scheme == "https"); |
32 | 34 |
33 if (!net::IsPortAllowedByDefault(request->url().IntPort())) | 35 if (!net::IsPortAllowedByDefault(request->url().IntPort())) |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 DCHECK(response_cookies_.empty()); | 563 DCHECK(response_cookies_.empty()); |
562 | 564 |
563 std::string name = "Set-Cookie"; | 565 std::string name = "Set-Cookie"; |
564 std::string value; | 566 std::string value; |
565 | 567 |
566 void* iter = NULL; | 568 void* iter = NULL; |
567 while (response_info_->headers->EnumerateHeader(&iter, name, &value)) | 569 while (response_info_->headers->EnumerateHeader(&iter, name, &value)) |
568 response_cookies_.push_back(value); | 570 response_cookies_.push_back(value); |
569 } | 571 } |
570 | 572 |
OLD | NEW |