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

Side by Side Diff: chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h

Issue 165223003: Add a Restore() method to ValueStore and make StorageAPI use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LEVELDB_SETTINGS_STORAGE_FACTORY_H _ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_LEVELDB_SETTINGS_STORAGE_FACTORY_H _
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_LEVELDB_SETTINGS_STORAGE_FACTORY_H _ 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_LEVELDB_SETTINGS_STORAGE_FACTORY_H _
7 7
8 #include "chrome/browser/extensions/api/storage/settings_storage_factory.h" 8 #include "chrome/browser/extensions/api/storage/settings_storage_factory.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 // Factory for creating LeveldbValueStore instances. 12 // Factory for creating LeveldbValueStore instances.
13 class LeveldbSettingsStorageFactory : public SettingsStorageFactory { 13 class LeveldbSettingsStorageFactory : public SettingsStorageFactory {
14 public: 14 public:
15 virtual ValueStore* Create(const base::FilePath& base_path, 15 virtual ValueStore* Create(const base::FilePath& base_path,
16 const std::string& extension_id) OVERRIDE; 16 const std::string& extension_id) OVERRIDE;
17 17
18 virtual base::FilePath GetDatabasePath(
19 const base::FilePath& base_path,
20 const std::string& extension_id) OVERRIDE;
not at google - send to devlin 2014/02/19 21:25:29 as discussed: don't need this on the factory inter
Devlin 2014/02/19 23:12:28 Done.
21
22 virtual void DeleteDatabaseIfExists(const base::FilePath& base_path,
23 const std::string& extension_id) OVERRIDE;
24
18 private: 25 private:
19 // SettingsStorageFactory is refcounted. 26 // SettingsStorageFactory is refcounted.
20 virtual ~LeveldbSettingsStorageFactory() {} 27 virtual ~LeveldbSettingsStorageFactory() {}
21 }; 28 };
22 29
23 } // namespace extensions 30 } // namespace extensions
24 31
25 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_LEVELDB_SETTINGS_STORAGE_FACTOR Y_H_ 32 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_LEVELDB_SETTINGS_STORAGE_FACTOR Y_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698