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

Side by Side 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: GN fix Created 6 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 | « sync/internal_api/attachments/proto/attachment_store.proto ('k') | sync/sync.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ON_DISK_ATTACHMENT_STORE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ON_DISK_ATTACHMENT_STORE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ON_DISK_ATTACHMENT_STORE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ON_DISK_ATTACHMENT_STORE_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 29 matching lines...) Expand all
40 void Read(const AttachmentIdList& ids, const ReadCallback& callback) override; 40 void Read(const AttachmentIdList& ids, const ReadCallback& callback) override;
41 void Write(const AttachmentList& attachments, 41 void Write(const AttachmentList& attachments,
42 const WriteCallback& callback) override; 42 const WriteCallback& callback) override;
43 void Drop(const AttachmentIdList& ids, const DropCallback& callback) override; 43 void Drop(const AttachmentIdList& ids, const DropCallback& callback) override;
44 44
45 // Opens leveldb database at |path|. It will create directory and database if 45 // Opens leveldb database at |path|. It will create directory and database if
46 // it doesn't exist. 46 // it doesn't exist.
47 Result OpenOrCreate(const base::FilePath& path); 47 Result OpenOrCreate(const base::FilePath& path);
48 48
49 private: 49 private:
50 std::string CreateDataKeyFromAttachmentId(const AttachmentId& attachment_id); 50 std::string MakeDataKeyFromAttachmentId(const AttachmentId& attachment_id);
51 51
52 scoped_refptr<base::SequencedTaskRunner> callback_task_runner_; 52 scoped_refptr<base::SequencedTaskRunner> callback_task_runner_;
53 scoped_ptr<leveldb::DB> db_; 53 scoped_ptr<leveldb::DB> db_;
54 }; 54 };
55 55
56 } // namespace syncer 56 } // namespace syncer
57 57
58 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ON_DISK_ATTACHMENT_STORE_H_ 58 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ON_DISK_ATTACHMENT_STORE_H_
OLDNEW
« no previous file with comments | « sync/internal_api/attachments/proto/attachment_store.proto ('k') | sync/sync.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698