| Index: chrome/browser/extensions/api/settings_private/settings_private_api.cc
|
| diff --git a/chrome/browser/extensions/api/settings_private/settings_private_api.cc b/chrome/browser/extensions/api/settings_private/settings_private_api.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..19fa41d51754f1119ff74bd362a6cfd81844e1ac
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/settings_private/settings_private_api.cc
|
| @@ -0,0 +1,95 @@
|
| +// Copyright 2015 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/settings_private/settings_private_api.h"
|
| +
|
| +#include "extensions/browser/extension_function_registry.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// SettingsPrivateSetBooleanPrefFunction
|
| +
|
| +SettingsPrivateSetBooleanPrefFunction::
|
| + ~SettingsPrivateSetBooleanPrefFunction() {
|
| +}
|
| +
|
| +bool SettingsPrivateSetBooleanPrefFunction::RunAsync() {
|
| + // TODO(orenb): Implement.
|
| + return true;
|
| +}
|
| +
|
| +void SettingsPrivateSetBooleanPrefFunction::Success() {
|
| + SendResponse(true);
|
| +}
|
| +
|
| +void SettingsPrivateSetBooleanPrefFunction::Failure(const std::string& error) {
|
| + error_ = error;
|
| + SendResponse(false);
|
| +}
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// SettingsPrivateSetNumericPrefFunction
|
| +
|
| +SettingsPrivateSetNumericPrefFunction::
|
| + ~SettingsPrivateSetNumericPrefFunction() {
|
| +}
|
| +
|
| +bool SettingsPrivateSetNumericPrefFunction::RunAsync() {
|
| + // TODO(orenb): Implement.
|
| + return true;
|
| +}
|
| +
|
| +void SettingsPrivateSetNumericPrefFunction::Success() {
|
| + SendResponse(true);
|
| +}
|
| +
|
| +void SettingsPrivateSetNumericPrefFunction::Failure(const std::string& error) {
|
| + error_ = error;
|
| + SendResponse(false);
|
| +}
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// SettingsPrivateSetStringPrefFunction
|
| +
|
| +SettingsPrivateSetStringPrefFunction::
|
| + ~SettingsPrivateSetStringPrefFunction() {
|
| +}
|
| +
|
| +bool SettingsPrivateSetStringPrefFunction::RunAsync() {
|
| + // TODO(orenb): Implement.
|
| + return true;
|
| +}
|
| +
|
| +void SettingsPrivateSetStringPrefFunction::Success() {
|
| + SendResponse(true);
|
| +}
|
| +
|
| +void SettingsPrivateSetStringPrefFunction::Failure(const std::string& error) {
|
| + error_ = error;
|
| + SendResponse(false);
|
| +}
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// SettingsPrivateGetAllPrefsFunction
|
| +
|
| +SettingsPrivateGetAllPrefsFunction::~SettingsPrivateGetAllPrefsFunction() {
|
| +}
|
| +
|
| +bool SettingsPrivateGetAllPrefsFunction::RunAsync() {
|
| + // TODO(orenb): Implement.
|
| + return true;
|
| +}
|
| +
|
| +void SettingsPrivateGetAllPrefsFunction::Success(
|
| + scoped_ptr<base::DictionaryValue> result) {
|
| + SendResponse(true);
|
| +}
|
| +
|
| +void SettingsPrivateGetAllPrefsFunction::Failure(const std::string& error) {
|
| + error_ = error;
|
| + SendResponse(false);
|
| +}
|
| +
|
| +} // namespace extensions
|
|
|