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

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

Issue 175853002: Revert of 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/storage/local_storage_backend.cc
diff --git a/chrome/browser/extensions/api/storage/local_storage_backend.cc b/chrome/browser/extensions/api/storage/local_storage_backend.cc
deleted file mode 100644
index 7e4880aca0a3a0e5bbd92bdd9b82728bd6142d5b..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/storage/local_storage_backend.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 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/local_storage_backend.h"
-
-#include "base/file_util.h"
-#include "chrome/browser/extensions/api/storage/settings_storage_factory.h"
-
-namespace extensions {
-
-LocalStorageBackend::LocalStorageBackend(
- const scoped_refptr<SettingsStorageFactory>& storage_factory,
- const base::FilePath& base_path,
- const SettingsStorageQuotaEnforcer::Limits& quota)
- : SettingsBackend(storage_factory, base_path, quota) {}
-
-LocalStorageBackend::~LocalStorageBackend() {}
-
-ValueStore* LocalStorageBackend::GetStorage(const std::string& extension_id) {
- StorageMap::iterator iter = storage_map_.find(extension_id);
- if (iter != storage_map_.end())
- return iter->second.get();
-
- linked_ptr<SettingsStorageQuotaEnforcer> storage(
- CreateStorageForExtension(extension_id).release());
- storage_map_[extension_id] = storage;
- return storage.get();
-}
-
-void LocalStorageBackend::DeleteStorage(const std::string& extension_id) {
- // Clear settings when the extension is uninstalled.
- storage_map_.erase(extension_id);
- storage_factory()->DeleteDatabaseIfExists(base_path(), extension_id);
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698