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

Unified Diff: chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc

Issue 189263013: Move extensions storage API implementation to src/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (move_storage) Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc
diff --git a/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc b/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc
deleted file mode 100644
index 361bd53995e0cb7b95580332f4732347b0c757c4..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h"
-
-#include "base/file_util.h"
-#include "base/logging.h"
-#include "extensions/browser/value_store/leveldb_value_store.h"
-
-namespace extensions {
-
-namespace {
-
-base::FilePath GetDatabasePath(const base::FilePath& base_path,
- const std::string& extension_id) {
- return base_path.AppendASCII(extension_id);
-}
-
-} // namespace
-
-ValueStore* LeveldbSettingsStorageFactory::Create(
- const base::FilePath& base_path,
- const std::string& extension_id) {
- return new LeveldbValueStore(GetDatabasePath(base_path, extension_id));
-}
-
-void LeveldbSettingsStorageFactory::DeleteDatabaseIfExists(
- const base::FilePath& base_path,
- const std::string& extension_id) {
- base::FilePath path = GetDatabasePath(base_path, extension_id);
- if (base::PathExists(path))
- base::DeleteFile(path, true /* recursive */);
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698