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 |
46 } // namespace | 50 } // namespace |
47 | 51 |
48 BlobURLRequestJob::BlobURLRequestJob( | 52 BlobURLRequestJob::BlobURLRequestJob( |
49 net::URLRequest* request, | 53 net::URLRequest* request, |
50 BlobData* blob_data, | 54 BlobData* blob_data, |
51 base::MessageLoopProxy* file_thread_proxy) | 55 base::MessageLoopProxy* file_thread_proxy) |
52 : net::URLRequestJob(request), | 56 : net::URLRequestJob(request), |
53 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 57 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
54 blob_data_(blob_data), | 58 blob_data_(blob_data), |
55 file_thread_proxy_(file_thread_proxy), | 59 file_thread_proxy_(file_thread_proxy), |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 file_thread_proxy_, | 528 file_thread_proxy_, |
525 item.file_path, | 529 item.file_path, |
526 item.offset, | 530 item.offset, |
527 item.expected_modification_time); | 531 item.expected_modification_time); |
528 } | 532 } |
529 DCHECK(index_to_reader_[index]); | 533 DCHECK(index_to_reader_[index]); |
530 return index_to_reader_[index]; | 534 return index_to_reader_[index]; |
531 } | 535 } |
532 | 536 |
533 } // namespace webkit_blob | 537 } // namespace webkit_blob |
OLD | NEW |