OLD | NEW |
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 #include "chrome/browser/extensions/api/storage/leveldb_settings_storage_factory
.h" | 5 #include "chrome/browser/extensions/api/storage/leveldb_settings_storage_factory
.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/value_store/leveldb_value_store.h" | 8 #include "chrome/browser/value_store/leveldb_value_store.h" |
9 | 9 |
10 namespace extensions { | 10 namespace extensions { |
11 | 11 |
12 ValueStore* LeveldbSettingsStorageFactory::Create( | 12 ValueStore* LeveldbSettingsStorageFactory::Create( |
13 const base::FilePath& base_path, | 13 const base::FilePath& base_path, |
14 const std::string& extension_id) { | 14 const std::string& extension_id) { |
15 return new LeveldbValueStore(base_path.AppendASCII(extension_id)); | 15 return new LeveldbValueStore(GetDatabasePath(base_path, extension_id)); |
| 16 } |
| 17 |
| 18 base::FilePath LeveldbSettingsStorageFactory::GetDatabasePath( |
| 19 const base::FilePath& base_path, |
| 20 const std::string& extension_id) { |
| 21 return base_path.AppendASCII(extension_id); |
16 } | 22 } |
17 | 23 |
18 } // namespace extensions | 24 } // namespace extensions |
OLD | NEW |