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 "storage/browser/blob/blob_url_request_job.h" | 5 #include "storage/browser/blob/blob_url_request_job.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // because we need to do multipart encoding here. | 152 // because we need to do multipart encoding here. |
153 // TODO(jianli): Support multipart byte range requests. | 153 // TODO(jianli): Support multipart byte range requests. |
154 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE); | 154 NotifyFailure(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE); |
155 } | 155 } |
156 } | 156 } |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 BlobURLRequestJob::~BlobURLRequestJob() { | 160 BlobURLRequestJob::~BlobURLRequestJob() { |
161 STLDeleteValues(&index_to_reader_); | 161 STLDeleteValues(&index_to_reader_); |
162 TRACE_EVENT_ASYNC_END1("Blob", "Request", this, "uuid", | 162 TRACE_EVENT_ASYNC_END1("Blob", "BlobRequest", this, "uuid", |
163 blob_data_ ? blob_data_->uuid() : "NotFound"); | 163 blob_data_ ? blob_data_->uuid() : "NotFound"); |
164 } | 164 } |
165 | 165 |
166 void BlobURLRequestJob::DidStart() { | 166 void BlobURLRequestJob::DidStart() { |
167 current_file_chunk_number_ = 0; | 167 current_file_chunk_number_ = 0; |
168 error_ = false; | 168 error_ = false; |
169 | 169 |
170 // We only support GET request per the spec. | 170 // We only support GET request per the spec. |
171 if (request()->method() != "GET") { | 171 if (request()->method() != "GET") { |
172 NotifyFailure(net::ERR_METHOD_NOT_SUPPORTED); | 172 NotifyFailure(net::ERR_METHOD_NOT_SUPPORTED); |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 | 641 |
642 default: | 642 default: |
643 break; | 643 break; |
644 } | 644 } |
645 | 645 |
646 NOTREACHED(); | 646 NOTREACHED(); |
647 return false; | 647 return false; |
648 } | 648 } |
649 | 649 |
650 } // namespace storage | 650 } // namespace storage |
OLD | NEW |