| Index: chrome/browser/extensions/api/storage/storage_api.h
|
| diff --git a/chrome/browser/extensions/settings/settings_api.h b/chrome/browser/extensions/api/storage/storage_api.h
|
| similarity index 75%
|
| rename from chrome/browser/extensions/settings/settings_api.h
|
| rename to chrome/browser/extensions/api/storage/storage_api.h
|
| index 38a18d5fe676bc8a08d970d0d029b92e470dce23..b217f6dbd2a2c13c44a11f74c1d2fad4439bf4d4 100644
|
| --- a/chrome/browser/extensions/settings/settings_api.h
|
| +++ b/chrome/browser/extensions/api/storage/storage_api.h
|
| @@ -2,24 +2,19 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_API_H_
|
| -#define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_API_H_
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_STORAGE_API_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_STORAGE_STORAGE_API_H_
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "chrome/browser/extensions/api/storage/settings_namespace.h"
|
| +#include "chrome/browser/extensions/api/storage/settings_observer.h"
|
| #include "chrome/browser/extensions/extension_function.h"
|
| -#include "chrome/browser/extensions/settings/settings_namespace.h"
|
| -#include "chrome/browser/extensions/settings/settings_observer.h"
|
| #include "chrome/browser/value_store/value_store.h"
|
|
|
| namespace extensions {
|
|
|
| // Superclass of all settings functions.
|
| -//
|
| -// NOTE: these all have "*SettingsFunction" names left over from when the API
|
| -// was called the "Settings API" (now "Storage API").
|
| -// TODO(kalman): Rename these functions, and all files under
|
| -// chrome/browser/extensions/settings.
|
| class SettingsFunction : public AsyncExtensionFunction {
|
| protected:
|
| SettingsFunction();
|
| @@ -57,23 +52,23 @@ class SettingsFunction : public AsyncExtensionFunction {
|
| scoped_refptr<SettingsObserverList> observers_;
|
| };
|
|
|
| -class GetSettingsFunction : public SettingsFunction {
|
| +class StorageGetFunction : public SettingsFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME("storage.get");
|
|
|
| protected:
|
| - virtual ~GetSettingsFunction() {}
|
| + virtual ~StorageGetFunction() {}
|
|
|
| // SettingsFunction:
|
| virtual bool RunWithStorage(ValueStore* storage) OVERRIDE;
|
| };
|
|
|
| -class SetSettingsFunction : public SettingsFunction {
|
| +class StorageSetFunction : public SettingsFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME("storage.set");
|
|
|
| protected:
|
| - virtual ~SetSettingsFunction() {}
|
| + virtual ~StorageSetFunction() {}
|
|
|
| // SettingsFunction:
|
| virtual bool RunWithStorage(ValueStore* storage) OVERRIDE;
|
| @@ -83,12 +78,12 @@ class SetSettingsFunction : public SettingsFunction {
|
| QuotaLimitHeuristics* heuristics) const OVERRIDE;
|
| };
|
|
|
| -class RemoveSettingsFunction : public SettingsFunction {
|
| +class StorageRemoveFunction : public SettingsFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME("storage.remove");
|
|
|
| protected:
|
| - virtual ~RemoveSettingsFunction() {}
|
| + virtual ~StorageRemoveFunction() {}
|
|
|
| // SettingsFunction:
|
| virtual bool RunWithStorage(ValueStore* storage) OVERRIDE;
|
| @@ -98,12 +93,12 @@ class RemoveSettingsFunction : public SettingsFunction {
|
| QuotaLimitHeuristics* heuristics) const OVERRIDE;
|
| };
|
|
|
| -class ClearSettingsFunction : public SettingsFunction {
|
| +class StorageClearFunction : public SettingsFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME("storage.clear");
|
|
|
| protected:
|
| - virtual ~ClearSettingsFunction() {}
|
| + virtual ~StorageClearFunction() {}
|
|
|
| // SettingsFunction:
|
| virtual bool RunWithStorage(ValueStore* storage) OVERRIDE;
|
| @@ -113,12 +108,12 @@ class ClearSettingsFunction : public SettingsFunction {
|
| QuotaLimitHeuristics* heuristics) const OVERRIDE;
|
| };
|
|
|
| -class GetBytesInUseSettingsFunction : public SettingsFunction {
|
| +class StorageGetBytesInUseFunction : public SettingsFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION_NAME("storage.getBytesInUse");
|
|
|
| protected:
|
| - virtual ~GetBytesInUseSettingsFunction() {}
|
| + virtual ~StorageGetBytesInUseFunction() {}
|
|
|
| // SettingsFunction:
|
| virtual bool RunWithStorage(ValueStore* storage) OVERRIDE;
|
| @@ -126,4 +121,4 @@ class GetBytesInUseSettingsFunction : public SettingsFunction {
|
|
|
| } // namespace extensions
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_API_H_
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_STORAGE_API_H_
|
|
|