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

Side by Side Diff: storage/browser/blob/blob_data_item.h

Issue 1292523002: [BlobAsync] Patch 3: Renderer Classes & Logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async2
Patch Set: comments and test Created 5 years, 1 month 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 | « content/content_tests.gypi ('k') | storage/browser/blob/blob_data_item.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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef STORAGE_BROWSER_BLOB_BLOB_DATA_ITEM_H_ 5 #ifndef STORAGE_BROWSER_BLOB_BLOB_DATA_ITEM_H_
6 #define STORAGE_BROWSER_BLOB_BLOB_DATA_ITEM_H_ 6 #define STORAGE_BROWSER_BLOB_BLOB_DATA_ITEM_H_
7 7
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 scoped_ptr<DataElement> item_; 76 scoped_ptr<DataElement> item_;
77 scoped_refptr<DataHandle> data_handle_; 77 scoped_refptr<DataHandle> data_handle_;
78 78
79 // This naked pointer is safe because the scope is protected by the DataHandle 79 // This naked pointer is safe because the scope is protected by the DataHandle
80 // instance for disk cache entries during the lifetime of this BlobDataItem. 80 // instance for disk cache entries during the lifetime of this BlobDataItem.
81 disk_cache::Entry* disk_cache_entry_; 81 disk_cache::Entry* disk_cache_entry_;
82 int disk_cache_stream_index_; // For TYPE_DISK_CACHE_ENTRY. 82 int disk_cache_stream_index_; // For TYPE_DISK_CACHE_ENTRY.
83 }; 83 };
84 84
85 #if defined(UNIT_TEST) 85 STORAGE_EXPORT bool operator==(const BlobDataItem& a, const BlobDataItem& b);
86 inline bool operator==(const BlobDataItem& a, const BlobDataItem& b) { 86 STORAGE_EXPORT bool operator!=(const BlobDataItem& a, const BlobDataItem& b);
87 return a.disk_cache_entry() == b.disk_cache_entry() &&
88 a.disk_cache_stream_index() == b.disk_cache_stream_index() &&
89 a.data_element() == b.data_element();
90 }
91
92 inline bool operator!=(const BlobDataItem& a, const BlobDataItem& b) {
93 return !(a == b);
94 }
95 #endif // defined(UNIT_TEST)
96 87
97 } // namespace storage 88 } // namespace storage
98 89
99 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_ITEM_H_ 90 #endif // STORAGE_BROWSER_BLOB_BLOB_DATA_ITEM_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | storage/browser/blob/blob_data_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698