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

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

Issue 461823002: [SyncFS] Support Delete operation on LevelDBWrapper::Iterator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work for a nit 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class Iterator { 49 class Iterator {
50 public: 50 public:
51 explicit Iterator(LevelDBWrapper* db); 51 explicit Iterator(LevelDBWrapper* db);
52 ~Iterator(); 52 ~Iterator();
53 53
54 bool Valid(); 54 bool Valid();
55 void Seek(const std::string& target); 55 void Seek(const std::string& target);
56 void SeekToFirst(); 56 void SeekToFirst();
57 void SeekToLast(); 57 void SeekToLast();
58 void Next(); 58 void Next();
59 void Delete();
59 leveldb::Slice key(); 60 leveldb::Slice key();
60 leveldb::Slice value(); 61 leveldb::Slice value();
61 62
62 private: 63 private:
63 // Advances internal iterators to be valid. 64 // Advances internal iterators to be valid.
64 void AdvanceIterators(); 65 void AdvanceIterators();
65 66
66 LevelDBWrapper* db_; // do not own 67 LevelDBWrapper* db_; // do not own
67 scoped_ptr<leveldb::Iterator> db_iterator_; 68 scoped_ptr<leveldb::Iterator> db_iterator_;
68 PendingOperationMap::iterator map_iterator_; 69 PendingOperationMap::iterator map_iterator_;
(...skipping 29 matching lines...) Expand all
98 99
99 PendingOperationMap pending_; 100 PendingOperationMap pending_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapper); 102 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapper);
102 }; 103 };
103 104
104 } // namespace drive_backend 105 } // namespace drive_backend
105 } // namespace sync_file_system 106 } // namespace sync_file_system
106 107
107 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_ 108 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LEVELDB_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698