| 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 "net/test/url_request/url_request_slow_download_job.h" | 5 #include "net/test/url_request/url_request_slow_download_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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
| 11 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 12 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 13 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 14 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 15 #include "net/base/io_buffer.h" | 16 #include "net/base/io_buffer.h" |
| 16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 17 #include "net/http/http_response_headers.h" | 18 #include "net/http/http_response_headers.h" |
| 18 #include "net/url_request/url_request.h" | 19 #include "net/url_request/url_request.h" |
| 19 #include "net/url_request/url_request_filter.h" | 20 #include "net/url_request/url_request_filter.h" |
| 20 #include "net/url_request/url_request_interceptor.h" | 21 #include "net/url_request/url_request_interceptor.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 info->headers = new HttpResponseHeaders(raw_headers); | 272 info->headers = new HttpResponseHeaders(raw_headers); |
| 272 } | 273 } |
| 273 | 274 |
| 274 bool URLRequestSlowDownloadJob::GetMimeType(std::string* mime_type) const { | 275 bool URLRequestSlowDownloadJob::GetMimeType(std::string* mime_type) const { |
| 275 HttpResponseInfo info; | 276 HttpResponseInfo info; |
| 276 GetResponseInfoConst(&info); | 277 GetResponseInfoConst(&info); |
| 277 return info.headers.get() && info.headers->GetMimeType(mime_type); | 278 return info.headers.get() && info.headers->GetMimeType(mime_type); |
| 278 } | 279 } |
| 279 | 280 |
| 280 } // namespace net | 281 } // namespace net |
| OLD | NEW |