OLD | NEW |
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_EXTENSIONS_API_STORAGE_SYNC_VALUE_STORE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_VALUE_STORE_CACHE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_VALUE_STORE_CACHE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_VALUE_STORE_CACHE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 const scoped_refptr<SettingsStorageFactory>& factory, | 34 const scoped_refptr<SettingsStorageFactory>& factory, |
35 const scoped_refptr<SettingsObserverList>& observers, | 35 const scoped_refptr<SettingsObserverList>& observers, |
36 const base::FilePath& profile_path); | 36 const base::FilePath& profile_path); |
37 virtual ~SyncValueStoreCache(); | 37 virtual ~SyncValueStoreCache(); |
38 | 38 |
39 syncer::SyncableService* GetSyncableService(syncer::ModelType type) const; | 39 syncer::SyncableService* GetSyncableService(syncer::ModelType type) const; |
40 | 40 |
41 // ValueStoreCache implementation: | 41 // ValueStoreCache implementation: |
42 virtual void RunWithValueStoreForExtension( | 42 virtual void RunWithValueStoreForExtension( |
43 const StorageCallback& callback, | 43 const StorageCallback& callback, |
44 scoped_refptr<const Extension> extension) OVERRIDE; | 44 scoped_refptr<const Extension> extension) override; |
45 virtual void DeleteStorageSoon(const std::string& extension_id) OVERRIDE; | 45 virtual void DeleteStorageSoon(const std::string& extension_id) override; |
46 | 46 |
47 private: | 47 private: |
48 void InitOnFileThread(const scoped_refptr<SettingsStorageFactory>& factory, | 48 void InitOnFileThread(const scoped_refptr<SettingsStorageFactory>& factory, |
49 const scoped_refptr<SettingsObserverList>& observers, | 49 const scoped_refptr<SettingsObserverList>& observers, |
50 const base::FilePath& profile_path); | 50 const base::FilePath& profile_path); |
51 | 51 |
52 bool initialized_; | 52 bool initialized_; |
53 scoped_ptr<SyncStorageBackend> app_backend_; | 53 scoped_ptr<SyncStorageBackend> app_backend_; |
54 scoped_ptr<SyncStorageBackend> extension_backend_; | 54 scoped_ptr<SyncStorageBackend> extension_backend_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(SyncValueStoreCache); | 56 DISALLOW_COPY_AND_ASSIGN(SyncValueStoreCache); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace extensions | 59 } // namespace extensions |
60 | 60 |
61 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_VALUE_STORE_CACHE_H_ | 61 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_VALUE_STORE_CACHE_H_ |
OLD | NEW |