Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: storage/browser/blob/blob_url_request_job.cc

Issue 1104053006: [Storage] Blob Storage perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copyright fix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/benchmarks/blob_storage.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/blob_storage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698