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

Unified Diff: sync/internal_api/public/attachments/on_disk_attachment_store.h

Issue 647553009: Introduce AttachmentStore metadata record (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: sync/internal_api/public/attachments/on_disk_attachment_store.h
diff --git a/sync/internal_api/public/attachments/on_disk_attachment_store.h b/sync/internal_api/public/attachments/on_disk_attachment_store.h
index d74b60bf60895fe66b56a1d1df9052fc83c685db..fdd9f33ab2d07c71632434ce228548941abfb90c 100644
--- a/sync/internal_api/public/attachments/on_disk_attachment_store.h
+++ b/sync/internal_api/public/attachments/on_disk_attachment_store.h
@@ -13,12 +13,17 @@
#include "sync/api/attachments/attachment_store.h"
#include "sync/base/sync_export.h"
+namespace attachment_store_pb {
+class AttachmentStoreMetadata;
+} // namespace attachment_store_pb
+
namespace base {
class SequencedTaskRunner;
} // namespace base
namespace leveldb {
class DB;
+class Status;
} // namespace leveldb
namespace syncer {
@@ -49,7 +54,13 @@ class SYNC_EXPORT OnDiskAttachmentStore : public AttachmentStoreBase,
Result OpenOrCreate(const base::FilePath& path);
private:
- std::string CreateDataKeyFromAttachmentId(const AttachmentId& attachment_id);
+ static leveldb::Status ReadStoreMetadata(
maniscalco 2014/10/21 21:41:03 Light suggestion: unless you need them to be part
pavely 2014/10/24 20:42:55 Done.
+ leveldb::DB* db,
+ attachment_store_pb::AttachmentStoreMetadata* metadata);
+ static leveldb::Status UpdateStoreMetadata(
+ leveldb::DB* db,
+ const attachment_store_pb::AttachmentStoreMetadata& metadata);
+ std::string MakeDataKeyFromAttachmentId(const AttachmentId& attachment_id);
scoped_refptr<base::SequencedTaskRunner> callback_task_runner_;
scoped_ptr<leveldb::DB> db_;

Powered by Google App Engine
This is Rietveld 408576698