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

Unified Diff: storage/browser/blob/shareable_blob_data_item.cc

Issue 895933007: [Storage] Blob items are now shared between blobs. Ready for disk swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and added one more histogram Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « storage/browser/blob/shareable_blob_data_item.h ('k') | storage/browser/blob/view_blob_internals_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/shareable_blob_data_item.cc
diff --git a/storage/browser/blob/shareable_blob_data_item.cc b/storage/browser/blob/shareable_blob_data_item.cc
new file mode 100644
index 0000000000000000000000000000000000000000..40aaf9c7e10d29d40acbc73798f67f6c16030b4d
--- /dev/null
+++ b/storage/browser/blob/shareable_blob_data_item.cc
@@ -0,0 +1,26 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "storage/browser/blob/shareable_blob_data_item.h"
+
+#include "storage/browser/blob/blob_data_item.h"
+
+namespace storage {
+
+ShareableBlobDataItem::ShareableBlobDataItem(
+ const std::string& blob_uuid,
+ const scoped_refptr<BlobDataItem>& item)
+ : item_(item) {
+ DCHECK_NE(item_->type(), DataElement::TYPE_BLOB);
+ referencing_blobs_.insert(blob_uuid);
+}
+
+ShareableBlobDataItem::~ShareableBlobDataItem() {
+}
+
+const scoped_refptr<BlobDataItem>& ShareableBlobDataItem::item() {
+ return item_;
+}
+
+} // namespace storage
« no previous file with comments | « storage/browser/blob/shareable_blob_data_item.h ('k') | storage/browser/blob/view_blob_internals_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698