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

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

Issue 2236453002: storage: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | storage/browser/blob/blob_storage_registry.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_reader.h" 5 #include "storage/browser/blob/blob_reader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 : file_stream_provider_(std::move(file_stream_provider)), 69 : file_stream_provider_(std::move(file_stream_provider)),
70 file_task_runner_(file_task_runner), 70 file_task_runner_(file_task_runner),
71 net_error_(net::OK), 71 net_error_(net::OK),
72 weak_factory_(this) { 72 weak_factory_(this) {
73 if (blob_handle && !blob_handle->IsBroken()) { 73 if (blob_handle && !blob_handle->IsBroken()) {
74 blob_handle_.reset(new BlobDataHandle(*blob_handle)); 74 blob_handle_.reset(new BlobDataHandle(*blob_handle));
75 } 75 }
76 } 76 }
77 77
78 BlobReader::~BlobReader() { 78 BlobReader::~BlobReader() {
79 STLDeleteValues(&index_to_reader_); 79 base::STLDeleteValues(&index_to_reader_);
80 } 80 }
81 81
82 BlobReader::Status BlobReader::CalculateSize( 82 BlobReader::Status BlobReader::CalculateSize(
83 const net::CompletionCallback& done) { 83 const net::CompletionCallback& done) {
84 DCHECK(!total_size_calculated_); 84 DCHECK(!total_size_calculated_);
85 DCHECK(size_callback_.is_null()); 85 DCHECK(size_callback_.is_null());
86 if (!blob_handle_.get() || blob_handle_->IsBroken()) { 86 if (!blob_handle_.get() || blob_handle_->IsBroken()) {
87 return ReportError(net::ERR_FILE_NOT_FOUND); 87 return ReportError(net::ERR_FILE_NOT_FOUND);
88 } 88 }
89 if (blob_handle_->IsBeingBuilt()) { 89 if (blob_handle_->IsBeingBuilt()) {
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 index_to_reader_.erase(found); 671 index_to_reader_.erase(found);
672 return; 672 return;
673 } 673 }
674 found->second = reader.release(); 674 found->second = reader.release();
675 } else if (reader.get()) { 675 } else if (reader.get()) {
676 index_to_reader_[current_item_index_] = reader.release(); 676 index_to_reader_[current_item_index_] = reader.release();
677 } 677 }
678 } 678 }
679 679
680 } // namespace storage 680 } // namespace storage
OLDNEW
« no previous file with comments | « no previous file | storage/browser/blob/blob_storage_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698