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

Side by Side Diff: sync/syncable/deferred_on_disk_directory_backing_store.h

Issue 642023004: Standardize usage of virtual/override/final in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « sync/sessions/model_type_registry.cc ('k') | sync/syncable/directory_backing_store_unittest.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 SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ 5 #ifndef SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_
6 #define SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ 6 #define SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "sync/base/sync_export.h" 9 #include "sync/base/sync_export.h"
10 #include "sync/syncable/directory_backing_store.h" 10 #include "sync/syncable/directory_backing_store.h"
11 11
12 namespace syncer { 12 namespace syncer {
13 namespace syncable { 13 namespace syncable {
14 14
15 // Store used for backing up user's data before first sync. It creates an 15 // Store used for backing up user's data before first sync. It creates an
16 // in-memory store first and switch to on-disk store if SaveChanges() is 16 // in-memory store first and switch to on-disk store if SaveChanges() is
17 // called, which only happens when SyncBackupManager is shut down and a 17 // called, which only happens when SyncBackupManager is shut down and a
18 // syncing backend is to be created. Thus we guarantee that user data is not 18 // syncing backend is to be created. Thus we guarantee that user data is not
19 // persisted until user is actually going to sync. 19 // persisted until user is actually going to sync.
20 class SYNC_EXPORT_PRIVATE DeferredOnDiskDirectoryBackingStore 20 class SYNC_EXPORT_PRIVATE DeferredOnDiskDirectoryBackingStore
21 : public DirectoryBackingStore { 21 : public DirectoryBackingStore {
22 public: 22 public:
23 DeferredOnDiskDirectoryBackingStore(const std::string& dir_name, 23 DeferredOnDiskDirectoryBackingStore(const std::string& dir_name,
24 const base::FilePath& backing_filepath); 24 const base::FilePath& backing_filepath);
25 virtual ~DeferredOnDiskDirectoryBackingStore(); 25 ~DeferredOnDiskDirectoryBackingStore() override;
26 virtual DirOpenResult Load( 26 DirOpenResult Load(Directory::MetahandlesMap* handles_map,
27 Directory::MetahandlesMap* handles_map, 27 JournalIndex* delete_journals,
28 JournalIndex* delete_journals, 28 Directory::KernelLoadInfo* kernel_load_info) override;
29 Directory::KernelLoadInfo* kernel_load_info) override; 29 bool SaveChanges(const Directory::SaveChangesSnapshot& snapshot) override;
30 virtual bool SaveChanges(const Directory::SaveChangesSnapshot& snapshot)
31 override;
32 30
33 private: 31 private:
34 base::FilePath backing_filepath_; 32 base::FilePath backing_filepath_;
35 33
36 // Whether current DB is on disk. 34 // Whether current DB is on disk.
37 bool db_is_on_disk_; 35 bool db_is_on_disk_;
38 36
39 DISALLOW_COPY_AND_ASSIGN(DeferredOnDiskDirectoryBackingStore); 37 DISALLOW_COPY_AND_ASSIGN(DeferredOnDiskDirectoryBackingStore);
40 }; 38 };
41 39
42 } // namespace syncable 40 } // namespace syncable
43 } // namespace syncer 41 } // namespace syncer
44 42
45 #endif // SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_ 43 #endif // SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_
OLDNEW
« no previous file with comments | « sync/sessions/model_type_registry.cc ('k') | sync/syncable/directory_backing_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698