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

Side by Side Diff: chrome/browser/chromeos/drive/drive_resource_metadata_storage.h

Issue 13149003: drive: Use "/drive/root" namespace and fix Files app and tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed LocalFileSystemExtensionApiTest which I have broken in this CL actually. Created 7 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadataStorageMemory); 115 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadataStorageMemory);
116 }; 116 };
117 117
118 // Implementation of DriveResourceMetadataStorage with leveldb. 118 // Implementation of DriveResourceMetadataStorage with leveldb.
119 class DriveResourceMetadataStorageDB 119 class DriveResourceMetadataStorageDB
120 : public DriveResourceMetadataStorage { 120 : public DriveResourceMetadataStorage {
121 public: 121 public:
122 // This should be incremented when incompatibility change is made to DB 122 // This should be incremented when incompatibility change is made to DB
123 // format. 123 // format.
124 static const int kDBVersion = 1; 124 static const int kDBVersion = 2;
125 125
126 explicit DriveResourceMetadataStorageDB(const base::FilePath& directory_path); 126 explicit DriveResourceMetadataStorageDB(const base::FilePath& directory_path);
127 virtual ~DriveResourceMetadataStorageDB(); 127 virtual ~DriveResourceMetadataStorageDB();
128 128
129 // DriveResourceMetadataStorage overrides: 129 // DriveResourceMetadataStorage overrides:
130 virtual bool Initialize() OVERRIDE; 130 virtual bool Initialize() OVERRIDE;
131 virtual bool IsPersistentStorage() OVERRIDE; 131 virtual bool IsPersistentStorage() OVERRIDE;
132 virtual void SetLargestChangestamp(int64 largest_changestamp) OVERRIDE; 132 virtual void SetLargestChangestamp(int64 largest_changestamp) OVERRIDE;
133 virtual int64 GetLargestChangestamp() OVERRIDE; 133 virtual int64 GetLargestChangestamp() OVERRIDE;
134 virtual void PutEntry(const DriveEntryProto& entry) OVERRIDE; 134 virtual void PutEntry(const DriveEntryProto& entry) OVERRIDE;
(...skipping 27 matching lines...) Expand all
162 162
163 // Parent-child relationship between entries. 163 // Parent-child relationship between entries.
164 scoped_ptr<leveldb::DB> child_map_; 164 scoped_ptr<leveldb::DB> child_map_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadataStorageDB); 166 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadataStorageDB);
167 }; 167 };
168 168
169 } // namespace drive 169 } // namespace drive
170 170
171 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ 171 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698