| OLD | NEW |
| 1 // Copyright (c) 20010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 20010 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/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.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 22 matching lines...) Expand all Loading... |
| 33 static const char* kHTTPOKText = "OK"; | 33 static const char* kHTTPOKText = "OK"; |
| 34 static const char* kHTTPPartialContentText = "Partial Content"; | 34 static const char* kHTTPPartialContentText = "Partial Content"; |
| 35 static const char* kHTTPNotAllowedText = "Not Allowed"; | 35 static const char* kHTTPNotAllowedText = "Not Allowed"; |
| 36 static const char* kHTTPNotFoundText = "Not Found"; | 36 static const char* kHTTPNotFoundText = "Not Found"; |
| 37 static const char* kHTTPMethodNotAllowText = "Method Not Allowed"; | 37 static const char* kHTTPMethodNotAllowText = "Method Not Allowed"; |
| 38 static const char* kHTTPRequestedRangeNotSatisfiableText = | 38 static const char* kHTTPRequestedRangeNotSatisfiableText = |
| 39 "Requested Range Not Satisfiable"; | 39 "Requested Range Not Satisfiable"; |
| 40 static const char* kHTTPInternalErrorText = "Internal Server Error"; | 40 static const char* kHTTPInternalErrorText = "Internal Server Error"; |
| 41 | 41 |
| 42 BlobURLRequestJob::BlobURLRequestJob( | 42 BlobURLRequestJob::BlobURLRequestJob( |
| 43 URLRequest* request, | 43 net::URLRequest* request, |
| 44 BlobData* blob_data, | 44 BlobData* blob_data, |
| 45 base::MessageLoopProxy* file_thread_proxy) | 45 base::MessageLoopProxy* file_thread_proxy) |
| 46 : URLRequestJob(request), | 46 : URLRequestJob(request), |
| 47 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 47 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| 48 blob_data_(blob_data), | 48 blob_data_(blob_data), |
| 49 file_thread_proxy_(file_thread_proxy), | 49 file_thread_proxy_(file_thread_proxy), |
| 50 ALLOW_THIS_IN_INITIALIZER_LIST( | 50 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 51 io_callback_(this, &BlobURLRequestJob::DidRead)), | 51 io_callback_(this, &BlobURLRequestJob::DidRead)), |
| 52 item_index_(0), | 52 item_index_(0), |
| 53 total_size_(0), | 53 total_size_(0), |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 // We don't support multiple range requests in one single URL request, | 532 // We don't support multiple range requests in one single URL request, |
| 533 // because we need to do multipart encoding here. | 533 // because we need to do multipart encoding here. |
| 534 // TODO(jianli): Support multipart byte range requests. | 534 // TODO(jianli): Support multipart byte range requests. |
| 535 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE); | 535 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE); |
| 536 } | 536 } |
| 537 } | 537 } |
| 538 } | 538 } |
| 539 } | 539 } |
| 540 | 540 |
| 541 } // namespace webkit_blob | 541 } // namespace webkit_blob |
| OLD | NEW |