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

Unified Diff: chrome/browser/dom_ui/options/autofill_options_handler.h

Issue 6034005: DOMUI: Implement the new-style Autofill options page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes 2. Created 10 years 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/dom_ui/options/autofill_options_handler.h
diff --git a/chrome/browser/dom_ui/options/autofill_options_handler.h b/chrome/browser/dom_ui/options/autofill_options_handler.h
index e9320474105456e7fd88328a30e10120e31bf670..eff357a38412240388eee7605d68b6a841ea39f0 100644
--- a/chrome/browser/dom_ui/options/autofill_options_handler.h
+++ b/chrome/browser/dom_ui/options/autofill_options_handler.h
@@ -5,9 +5,14 @@
#ifndef CHROME_BROWSER_DOM_UI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_
#define CHROME_BROWSER_DOM_UI_OPTIONS_AUTOFILL_OPTIONS_HANDLER_H_
+#include <string>
+
#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/dom_ui/options/options_ui.h"
+class DictionaryValue;
+class ListValue;
+
class AutoFillOptionsHandler : public OptionsPageUIHandler,
public PersonalDataManager::Observer {
public:
@@ -31,38 +36,38 @@ class AutoFillOptionsHandler : public OptionsPageUIHandler,
// Loads AutoFill addresses and credit cards using the PersonalDataManager.
void LoadAutoFillData();
- // Adds or updates an address, depending on the unique ID of the address. If
- // the unique ID is 0, a new address is added to the WebDatabase; otherwise,
- // the address with the matching ID is updated. Called from DOMUI.
- // |args| - an array containing the unique ID of the address followed by the
+ // Removes either an address or a credit card, depending on the type of the
+ // profile.
+ // |args| - A string, the GUID of the profile to remove.
+ void RemoveAutoFillProfile(const ListValue* args);
+
+ // Requests profile data for a specific profile. Calls into DOMUI with the
+ // loaded profile data to open the appropriate editor, depending on the type
+ // of the profile.
+ // |args| - A string, the GUID of the profile to load.
+ void LoadProfileEditor(const ListValue* args);
+
+ // Adds or updates an address, depending on the GUID of the profile. If the
+ // GUID is empty, a new address is added to the WebDatabase; otherwise, the
+ // address with the matching GUID is updated. Called from DOMUI.
+ // |args| - an array containing the GUID of the address followed by the
// address data.
- void UpdateAddress(const ListValue* args);
+ void SetAddress(const ListValue* args);
+
+ // Adds or updates a credit card, depending on the GUID of the profile. If the
+ // GUID is empty, a new credit card is added to the WebDatabase; otherwise,
+ // the credit card with the matching GUID is updated. Called from DOMUI.
+ // |args| - an array containing the GUID of the credit card followed by the
+ // credit card data.
+ void SetCreditCard(const ListValue* args);
// Loads the data from an address and sends this data back to the DOMUI to
- // show in the address editor. Called from DOMUI.
- // |args| - an integer, the unique ID of the address to edit.
- void EditAddress(const ListValue* args);
-
- // Removes an address from the WebDatabase. Called from DOMUI.
- // |args| - an integer, the unique ID of the address to remove.
- void RemoveAddress(const ListValue* args);
-
- // Adds or updates a credit card, depending on the unique ID of the credit
- // card. If the unique ID is 0, a new credit card is added to the WebDatabase;
- // otherwise, the credit card with the matching ID is updated. Called from
- // DOMUI.
- // |args| - an array containing the unique ID of the credit card followed by
- // the credit card data.
- void UpdateCreditCard(const ListValue* args);
+ // show in the address editor. |guid| is the GUID of the profile to load.
+ void EditAddress(const std::string& guid);
// Loads the data from a credit card and sends this data back to the DOMUI to
- // show in the credit card editor. Called from DOMUI.
- // |args| - an integer, the unique ID of the credit card to edit.
- void EditCreditCard(const ListValue* args);
-
- // Removes a credit card from the WebDatabase. Called from DOMUI.
- // |args| - an integer, the unique ID of the credit card to remove.
- void RemoveCreditCard(const ListValue* args);
+ // show in the credit card editor. |guid| is the GUID of the profile to load.
+ void EditCreditCard(const std::string& guid);
// The personal data manager, used to load AutoFill profiles and credit cards.
// Unowned pointer, may not be NULL.

Powered by Google App Engine
This is Rietveld 408576698