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

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

Issue 2516713002: [BlobStorage] Implementing disk. (Closed)
Patch Set: removed cleanup check, as mac doesn't run out event loops Created 4 years 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 | « storage/browser/blob/blob_entry.h ('k') | storage/browser/blob/blob_memory_controller.h » ('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 <utility> 5 #include <utility>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "storage/browser/blob/blob_data_handle.h" 10 #include "storage/browser/blob/blob_data_handle.h"
(...skipping 18 matching lines...) Expand all
29 BlobEntry::ItemCopyEntry::~ItemCopyEntry() {} 29 BlobEntry::ItemCopyEntry::~ItemCopyEntry() {}
30 30
31 BlobEntry::BuildingState::BuildingState( 31 BlobEntry::BuildingState::BuildingState(
32 bool transport_items_present, 32 bool transport_items_present,
33 TransportAllowedCallback transport_allowed_callback, 33 TransportAllowedCallback transport_allowed_callback,
34 size_t num_building_dependent_blobs) 34 size_t num_building_dependent_blobs)
35 : transport_items_present(transport_items_present), 35 : transport_items_present(transport_items_present),
36 transport_allowed_callback(transport_allowed_callback), 36 transport_allowed_callback(transport_allowed_callback),
37 num_building_dependent_blobs(num_building_dependent_blobs) {} 37 num_building_dependent_blobs(num_building_dependent_blobs) {}
38 38
39 BlobEntry::BuildingState::~BuildingState() {} 39 BlobEntry::BuildingState::~BuildingState() {
40 DCHECK(!copy_quota_request);
41 DCHECK(!transport_quota_request);
42 }
43
44 void BlobEntry::BuildingState::CancelRequests() {
45 if (copy_quota_request) {
46 copy_quota_request->Cancel();
47 }
48 if (transport_quota_request) {
49 transport_quota_request->Cancel();
50 }
51 }
40 52
41 BlobEntry::BlobEntry(const std::string& content_type, 53 BlobEntry::BlobEntry(const std::string& content_type,
42 const std::string& content_disposition) 54 const std::string& content_disposition)
43 : content_type_(content_type), content_disposition_(content_disposition) {} 55 : content_type_(content_type), content_disposition_(content_disposition) {}
44 BlobEntry::~BlobEntry() {} 56 BlobEntry::~BlobEntry() {}
45 57
46 void BlobEntry::AppendSharedBlobItem( 58 void BlobEntry::AppendSharedBlobItem(
47 scoped_refptr<ShareableBlobDataItem> item) { 59 scoped_refptr<ShareableBlobDataItem> item) {
48 DCHECK(item); 60 DCHECK(item);
49 if (!items_.empty()) { 61 if (!items_.empty()) {
(...skipping 10 matching lines...) Expand all
60 72
61 void BlobEntry::ClearItems() { 73 void BlobEntry::ClearItems() {
62 items_.clear(); 74 items_.clear();
63 } 75 }
64 76
65 void BlobEntry::ClearOffsets() { 77 void BlobEntry::ClearOffsets() {
66 offsets_.clear(); 78 offsets_.clear();
67 } 79 }
68 80
69 } // namespace storage 81 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/blob/blob_entry.h ('k') | storage/browser/blob/blob_memory_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698