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

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: Fixes and metric unittest Created 5 years, 7 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
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 .release(); 613 .release();
614 break; 614 break;
615 default: 615 default:
616 NOTREACHED(); 616 NOTREACHED();
617 } 617 }
618 DCHECK(reader); 618 DCHECK(reader);
619 index_to_reader_[index] = reader; 619 index_to_reader_[index] = reader;
620 } 620 }
621 621
622 } // namespace storage 622 } // namespace storage
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/blob_storage.py » ('j') | tools/perf/benchmarks/blob_storage.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698