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

Unified Diff: chrome/browser/extensions/api/autofill_private/autofill_private_api.cc

Issue 1099313003: Add the IDL and stub implementation for the chrome.autofillPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kalman comments. Created 5 years, 8 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/autofill_private/autofill_private_api.cc
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_private_api.cc b/chrome/browser/extensions/api/autofill_private/autofill_private_api.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6dcd5eaa2892c6566e7f19d574bad705b2e6cbc5
--- /dev/null
+++ b/chrome/browser/extensions/api/autofill_private/autofill_private_api.cc
@@ -0,0 +1,109 @@
+// 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/autofill_private/autofill_private_api.h"
+
+#include "base/values.h"
Dan Beam 2015/04/23 20:49:12 don't include something in the .h and the .cc (onl
Kyle Horimoto 2015/04/23 22:00:26 Acknowledged.
+#include "chrome/common/extensions/api/autofill_private.h"
+#include "extensions/browser/extension_function_registry.h"
+
+namespace extensions {
+
+////////////////////////////////////////////////////////////////////////////////
+// AutofillPrivateSaveAddressFunction
+
+AutofillPrivateSaveAddressFunction::~AutofillPrivateSaveAddressFunction() {}
+
+ExtensionFunction::ResponseAction AutofillPrivateSaveAddressFunction::Run() {
+ scoped_ptr<api::autofill_private::SaveAddress::Params> parameters =
+ api::autofill_private::SaveAddress::Params::Create(*args_);
+ EXTENSION_FUNCTION_VALIDATE(parameters.get());
+
+ // TODO(khorimoto): Implement.
+
+ return RespondNow(NoArguments());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AutofillPrivate*Function
+
+AutofillPrivateGetAddressComponentsFunction::
+ ~AutofillPrivateGetAddressComponentsFunction() {}
+
+ExtensionFunction::ResponseAction
+ AutofillPrivateGetAddressComponentsFunction::Run() {
+ scoped_ptr<api::autofill_private::GetAddressComponents::Params> parameters =
+ api::autofill_private::GetAddressComponents::Params::Create(*args_);
+ EXTENSION_FUNCTION_VALIDATE(parameters.get());
+
+ // TODO(khorimoto): Implement.
+
+ return RespondNow(NoArguments());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AutofillPrivateSaveCreditCardFunction
+
+AutofillPrivateSaveCreditCardFunction::
+ ~AutofillPrivateSaveCreditCardFunction() {}
+
+ExtensionFunction::ResponseAction AutofillPrivateSaveCreditCardFunction::Run() {
+ scoped_ptr<api::autofill_private::SaveCreditCard::Params> parameters =
+ api::autofill_private::SaveCreditCard::Params::Create(*args_);
+ EXTENSION_FUNCTION_VALIDATE(parameters.get());
+
+ // TODO(khorimoto): Implement.
+
+ return RespondNow(NoArguments());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AutofillPrivateRemoveEntryFunction
+
+AutofillPrivateRemoveEntryFunction::~AutofillPrivateRemoveEntryFunction() {}
+
+ExtensionFunction::ResponseAction AutofillPrivateRemoveEntryFunction::Run() {
+ scoped_ptr<api::autofill_private::RemoveEntry::Params> parameters =
+ api::autofill_private::RemoveEntry::Params::Create(*args_);
+ EXTENSION_FUNCTION_VALIDATE(parameters.get());
+
+ // TODO(khorimoto): Implement.
+
+ return RespondNow(NoArguments());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AutofillPrivateValidatePhoneNumbersFunction
+
+AutofillPrivateValidatePhoneNumbersFunction::
+ ~AutofillPrivateValidatePhoneNumbersFunction() {}
+
+ExtensionFunction::ResponseAction
+ AutofillPrivateValidatePhoneNumbersFunction::Run() {
+ scoped_ptr<api::autofill_private::ValidatePhoneNumbers::Params> parameters =
+ api::autofill_private::ValidatePhoneNumbers::Params::Create(*args_);
+ EXTENSION_FUNCTION_VALIDATE(parameters.get());
+
+ // TODO(khorimoto): Implement.
+
+ return RespondNow(NoArguments());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AutofillPrivateMaskCreditCardFunction
+
+AutofillPrivateMaskCreditCardFunction::
+ ~AutofillPrivateMaskCreditCardFunction() {}
+
+ExtensionFunction::ResponseAction AutofillPrivateMaskCreditCardFunction::Run() {
+ scoped_ptr<api::autofill_private::MaskCreditCard::Params> parameters =
+ api::autofill_private::MaskCreditCard::Params::Create(*args_);
+ EXTENSION_FUNCTION_VALIDATE(parameters.get());
+
+ // TODO(khorimoto): Implement.
+
+ return RespondNow(NoArguments());
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698