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

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

Issue 552723002: [SyncFS] Test MetadataDatabaseTest using both on-memory and on-disk indexes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database.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 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_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 }; 118 };
119 119
120 // The entry point of the MetadataDatabase for production code. 120 // The entry point of the MetadataDatabase for production code.
121 // If |env_override| is non-NULL, internal LevelDB uses |env_override| instead 121 // If |env_override| is non-NULL, internal LevelDB uses |env_override| instead
122 // of leveldb::Env::Default(). Use leveldb::MemEnv in test code for faster 122 // of leveldb::Env::Default(). Use leveldb::MemEnv in test code for faster
123 // testing. 123 // testing.
124 static scoped_ptr<MetadataDatabase> Create( 124 static scoped_ptr<MetadataDatabase> Create(
125 const base::FilePath& database_path, 125 const base::FilePath& database_path,
126 leveldb::Env* env_override, 126 leveldb::Env* env_override,
127 SyncStatusCode* status); 127 SyncStatusCode* status);
128 static scoped_ptr<MetadataDatabase> CreateInternal(
129 const base::FilePath& database_path,
130 leveldb::Env* env_override,
131 bool enable_on_disk_index,
132 SyncStatusCode* status);
128 static SyncStatusCode CreateForTesting( 133 static SyncStatusCode CreateForTesting(
129 scoped_ptr<LevelDBWrapper> db, 134 scoped_ptr<LevelDBWrapper> db,
130 bool enable_on_disk_index, 135 bool enable_on_disk_index,
131 scoped_ptr<MetadataDatabase>* metadata_database_out); 136 scoped_ptr<MetadataDatabase>* metadata_database_out);
132 137
133 ~MetadataDatabase(); 138 ~MetadataDatabase();
134 139
135 static void ClearDatabase(scoped_ptr<MetadataDatabase> metadata_database); 140 static void ClearDatabase(scoped_ptr<MetadataDatabase> metadata_database);
136 141
137 int64 GetLargestFetchedChangeID() const; 142 int64 GetLargestFetchedChangeID() const;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 400
396 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; 401 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_;
397 402
398 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); 403 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase);
399 }; 404 };
400 405
401 } // namespace drive_backend 406 } // namespace drive_backend
402 } // namespace sync_file_system 407 } // namespace sync_file_system
403 408
404 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 409 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698