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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h

Issue 436193003: [SyncFS] Rename LevelDBWrapper::Operation not to be confusing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.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 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 CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 }; 31 };
32 32
33 // LevelDBWrapper class wraps leveldb::DB and leveldb::WriteBatch to provide 33 // LevelDBWrapper class wraps leveldb::DB and leveldb::WriteBatch to provide
34 // transparent access to pre-commit data. 34 // transparent access to pre-commit data.
35 // Put() and Delete() update data on memory, and Get() can access to those data 35 // Put() and Delete() update data on memory, and Get() can access to those data
36 // and also data on disk. Those data on memory are written down on disk when 36 // and also data on disk. Those data on memory are written down on disk when
37 // Commit() is called. 37 // Commit() is called.
38 class LevelDBWrapper { 38 class LevelDBWrapper {
39 private: 39 private:
40 enum Operation { 40 enum Operation {
41 DB_PUT, 41 PUT_OPERATION,
42 DB_DELETE, 42 DELETE_OPERATION,
43 }; 43 };
44 typedef std::pair<Operation, std::string> Transaction; 44 typedef std::pair<Operation, std::string> Transaction;
45 typedef std::map<std::string, Transaction, SliceComparator> 45 typedef std::map<std::string, Transaction, SliceComparator>
46 PendingOperationMap; 46 PendingOperationMap;
47 47
48 public: 48 public:
49 class Iterator { 49 class Iterator {
50 public: 50 public:
51 explicit Iterator(LevelDBWrapper* db); 51 explicit Iterator(LevelDBWrapper* db);
52 ~Iterator(); 52 ~Iterator();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 PendingOperationMap pending_; 96 PendingOperationMap pending_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapper); 98 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapper);
99 }; 99 };
100 100
101 } // namespace drive_backend 101 } // namespace drive_backend
102 } // namespace sync_file_system 102 } // namespace sync_file_system
103 103
104 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_ 104 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698