Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / webui / options / autofill_options_handler.h
index bd7a100..7bef9bd 100644 (file)
@@ -12,6 +12,7 @@
 #include "components/autofill/core/browser/personal_data_manager_observer.h"
 
 namespace autofill {
+class AutofillProfile;
 class PersonalDataManager;
 }  // namespace autofill
 
@@ -39,6 +40,8 @@ class AutofillOptionsHandler : public OptionsPageUIHandler,
   virtual void OnPersonalDataChanged() OVERRIDE;
 
  private:
+  FRIEND_TEST_ALL_PREFIXES(AutofillOptionsHandlerTest, AddressToDictionary);
+
   // Loads the strings for the address and credit card overlays.
   void SetAddressOverlayStrings(base::DictionaryValue* localized_strings);
   void SetCreditCardOverlayStrings(base::DictionaryValue* localized_strings);
@@ -95,6 +98,11 @@ class AutofillOptionsHandler : public OptionsPageUIHandler,
   // Returns true if |personal_data_| is non-null and loaded.
   bool IsPersonalDataLoaded() const;
 
+  // Fills in |address| with the data format that the options js expects.
+  static void AutofillProfileToDictionary(
+      const autofill::AutofillProfile& profile,
+      base::DictionaryValue* address);
+
   // The personal data manager, used to load Autofill profiles and credit cards.
   // Unowned pointer, may not be NULL.
   autofill::PersonalDataManager* personal_data_;