| 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 "webkit/blob/blob_url_request_job.h" | 5 #include "webkit/blob/blob_url_request_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/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 const char kHTTPOKText[] = "OK"; | 37 const char kHTTPOKText[] = "OK"; |
| 38 const char kHTTPPartialContentText[] = "Partial Content"; | 38 const char kHTTPPartialContentText[] = "Partial Content"; |
| 39 const char kHTTPNotAllowedText[] = "Not Allowed"; | 39 const char kHTTPNotAllowedText[] = "Not Allowed"; |
| 40 const char kHTTPNotFoundText[] = "Not Found"; | 40 const char kHTTPNotFoundText[] = "Not Found"; |
| 41 const char kHTTPMethodNotAllowText[] = "Method Not Allowed"; | 41 const char kHTTPMethodNotAllowText[] = "Method Not Allowed"; |
| 42 const char kHTTPRequestedRangeNotSatisfiableText[] = | 42 const char kHTTPRequestedRangeNotSatisfiableText[] = |
| 43 "Requested Range Not Satisfiable"; | 43 "Requested Range Not Satisfiable"; |
| 44 const char kHTTPInternalErrorText[] = "Internal Server Error"; | 44 const char kHTTPInternalErrorText[] = "Internal Server Error"; |
| 45 | 45 |
| 46 const int kFileOpenFlags = base::PLATFORM_FILE_OPEN | | |
| 47 base::PLATFORM_FILE_READ | | |
| 48 base::PLATFORM_FILE_ASYNC; | |
| 49 | |
| 50 } // namespace | 46 } // namespace |
| 51 | 47 |
| 52 BlobURLRequestJob::BlobURLRequestJob( | 48 BlobURLRequestJob::BlobURLRequestJob( |
| 53 net::URLRequest* request, | 49 net::URLRequest* request, |
| 54 BlobData* blob_data, | 50 BlobData* blob_data, |
| 55 base::MessageLoopProxy* file_thread_proxy) | 51 base::MessageLoopProxy* file_thread_proxy) |
| 56 : net::URLRequestJob(request), | 52 : net::URLRequestJob(request), |
| 57 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 53 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
| 58 blob_data_(blob_data), | 54 blob_data_(blob_data), |
| 59 file_thread_proxy_(file_thread_proxy), | 55 file_thread_proxy_(file_thread_proxy), |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 file_thread_proxy_, | 524 file_thread_proxy_, |
| 529 item.file_path, | 525 item.file_path, |
| 530 item.offset, | 526 item.offset, |
| 531 item.expected_modification_time); | 527 item.expected_modification_time); |
| 532 } | 528 } |
| 533 DCHECK(index_to_reader_[index]); | 529 DCHECK(index_to_reader_[index]); |
| 534 return index_to_reader_[index]; | 530 return index_to_reader_[index]; |
| 535 } | 531 } |
| 536 | 532 |
| 537 } // namespace webkit_blob | 533 } // namespace webkit_blob |
| OLD | NEW |