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

Unified Diff: chrome/browser/extensions/api/settings_private/settings_private_api.cc

Issue 1015623005: chrome.settingsPrivate: Basic stub implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to initial comments. Created 5 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/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

Powered by Google App Engine
This is Rietveld 408576698