summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/DEPS1
-rw-r--r--chrome/browser/autofill/DEPS25
-rw-r--r--chrome/browser/autofill/autocheckout/whitelist_manager.cc2
-rw-r--r--chrome/browser/autofill/autocheckout/whitelist_manager_unittest.cc2
-rw-r--r--chrome/browser/autofill/autocomplete_history_manager.cc2
-rw-r--r--chrome/browser/autofill/autofill_common_test.cc2
-rw-r--r--chrome/browser/autofill/autofill_download.cc2
-rw-r--r--chrome/browser/autofill/autofill_download_url.cc2
-rw-r--r--chrome/browser/autofill/autofill_manager.cc4
-rw-r--r--chrome/browser/autofill/autofill_manager_unittest.cc1
-rw-r--r--chrome/browser/autofill/form_structure.cc1
-rw-r--r--chrome/browser/autofill/form_structure_unittest.cc1
-rw-r--r--chrome/browser/autofill/personal_data_manager.cc2
-rw-r--r--chrome/browser/autofill/risk/fingerprint_browsertest.cc1
-rw-r--r--chrome/browser/autofill/wallet/wallet_service_url.cc2
-rw-r--r--chrome/common/chrome_switches.cc20
-rw-r--r--chrome/common/chrome_switches.h10
-rw-r--r--chrome/common/pref_names.cc17
-rw-r--r--chrome/common/pref_names.h7
-rw-r--r--chrome/renderer/autofill/DEPS20
-rw-r--r--chrome/renderer/autofill/form_autofill_util.cc2
-rw-r--r--components/autofill.gypi4
-rw-r--r--components/autofill/common/autofill_pref_names.cc26
-rw-r--r--components/autofill/common/autofill_pref_names.h20
-rw-r--r--components/autofill/common/autofill_switches.cc27
-rw-r--r--components/autofill/common/autofill_switches.h20
26 files changed, 141 insertions, 82 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index 3ce6af8..71b442a 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -7,6 +7,7 @@ include_rules = [
"+chromeos",
"+components/autofill/common",
"+components/auto_login_parser",
+ "+components/autofill/common",
"+components/navigation_interception",
"+components/user_prefs",
"+components/visitedlink/browser",
diff --git a/chrome/browser/autofill/DEPS b/chrome/browser/autofill/DEPS
index b52824e..3b46adf 100644
--- a/chrome/browser/autofill/DEPS
+++ b/chrome/browser/autofill/DEPS
@@ -1,13 +1,29 @@
include_rules = [
# Autofill is being made into a component (it will end up at
- # src/components/autofill and not depend on src/chrome), so we have
+ # //components/autofill and not depend on //chrome), so we have
# these basic rules followed by temporary exceptions. Please don't
# add to the list of exceptions!
"-chrome/browser",
- "+chrome/browser/api/sync",
- "+chrome/browser/api/webdata",
+ "-chrome/common",
"+chrome/browser/autofill",
- "+chrome/browser/common",
+
+ # TODO(joi): These rules are necessary until we move these files to
+ # //components/autofill/common.
+ "+chrome/common/autofill/autocheckout_status.h",
+ "+chrome/common/autofill/web_element_descriptor.h",
+ "+chrome/common/autofill_messages.h",
+ "+chrome/common/form_data.h",
+ "+chrome/common/form_data_predictions.h",
+ "+chrome/common/form_field_data.h",
+ "+chrome/common/form_field_data_predictions.h",
+ "+chrome/common/password_form_fill_data.h",
+
+ # TODO(joi): Get rid of these.
+ "!chrome/common/render_messages.h",
+ "!chrome/common/chrome_constants.h",
+ "!chrome/common/chrome_notification_types.h",
+ "!chrome/common/chrome_paths.h",
+ "!chrome/common/url_constants.h",
# Permanently-allowed DEPS beyond the standard Browser
# Components-like DEPS above go here.
@@ -45,6 +61,7 @@ specific_include_rules = {
"!chrome/browser/ui/browser_tabstrip.h",
"!chrome/browser/ui/browser_window.h",
"!chrome/browser/ui/tabs/tab_strip_model.h",
+ "!chrome/common/pref_names.h"
],
# TODO(joi): These files will stay in chrome/browser/autofill when
diff --git a/chrome/browser/autofill/autocheckout/whitelist_manager.cc b/chrome/browser/autofill/autocheckout/whitelist_manager.cc
index bf1196aa..aa6789a 100644
--- a/chrome/browser/autofill/autocheckout/whitelist_manager.cc
+++ b/chrome/browser/autofill/autocheckout/whitelist_manager.cc
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_util.h"
#include "base/strings/string_split.h"
-#include "chrome/common/chrome_switches.h"
+#include "components/autofill/common/autofill_switches.h"
#include "content/public/browser/browser_context.h"
#include "googleurl/src/gurl.h"
#include "net/base/load_flags.h"
diff --git a/chrome/browser/autofill/autocheckout/whitelist_manager_unittest.cc b/chrome/browser/autofill/autocheckout/whitelist_manager_unittest.cc
index c940efd..562af65 100644
--- a/chrome/browser/autofill/autocheckout/whitelist_manager_unittest.cc
+++ b/chrome/browser/autofill/autocheckout/whitelist_manager_unittest.cc
@@ -5,8 +5,8 @@
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/autofill/autocheckout/whitelist_manager.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/autofill/common/autofill_switches.h"
#include "content/public/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
diff --git a/chrome/browser/autofill/autocomplete_history_manager.cc b/chrome/browser/autofill/autocomplete_history_manager.cc
index 5455575..b75c696 100644
--- a/chrome/browser/autofill/autocomplete_history_manager.cc
+++ b/chrome/browser/autofill/autocomplete_history_manager.cc
@@ -12,8 +12,8 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_external_delegate.h"
#include "chrome/browser/autofill/validation.h"
-#include "chrome/common/pref_names.h"
#include "components/autofill/common/autofill_messages.h"
+#include "components/autofill/common/autofill_pref_names.h"
#include "components/autofill/common/form_data.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
diff --git a/chrome/browser/autofill/autofill_common_test.cc b/chrome/browser/autofill/autofill_common_test.cc
index 0e53c17..f7cdf3b 100644
--- a/chrome/browser/autofill/autofill_common_test.cc
+++ b/chrome/browser/autofill/autofill_common_test.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/password_manager/encryptor.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/pref_names.h"
+#include "components/autofill/common/autofill_pref_names.h"
#include "components/autofill/common/form_field_data.h"
#include "components/user_prefs/user_prefs.h"
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
index 394ca7f..ebb2cbd 100644
--- a/chrome/browser/autofill/autofill_download.cc
+++ b/chrome/browser/autofill/autofill_download.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/autofill/autofill_metrics.h"
#include "chrome/browser/autofill/autofill_xml_parser.h"
#include "chrome/browser/autofill/form_structure.h"
-#include "chrome/common/pref_names.h"
+#include "components/autofill/common/autofill_pref_names.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/autofill/autofill_download_url.cc b/chrome/browser/autofill/autofill_download_url.cc
index 8bf1602..d3bc8a7 100644
--- a/chrome/browser/autofill/autofill_download_url.cc
+++ b/chrome/browser/autofill/autofill_download_url.cc
@@ -7,7 +7,7 @@
#include <string>
#include "base/command_line.h"
-#include "chrome/common/chrome_switches.h"
+#include "components/autofill/common/autofill_switches.h"
#include "googleurl/src/gurl.h"
namespace {
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 4358172..8b81565 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -38,10 +38,10 @@
#include "chrome/browser/autofill/phone_number.h"
#include "chrome/browser/autofill/phone_number_i18n.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/common/autofill_messages.h"
+#include "components/autofill/common/autofill_pref_names.h"
+#include "components/autofill/common/autofill_switches.h"
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/form_data_predictions.h"
#include "components/autofill/common/form_field_data.h"
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index a6a91ef..705799b 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -31,7 +31,6 @@
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 4b72789..06f3708 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -22,7 +22,6 @@
#include "chrome/browser/autofill/autofill_xml_parser.h"
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_field.h"
-#include "chrome/common/chrome_switches.h"
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/form_data_predictions.h"
#include "components/autofill/common/form_field_data.h"
diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
index fe6bb4f..d4436d1 100644
--- a/chrome/browser/autofill/form_structure_unittest.cc
+++ b/chrome/browser/autofill/form_structure_unittest.cc
@@ -8,7 +8,6 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_metrics.h"
-#include "chrome/common/chrome_switches.h"
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/form_field_data.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index c0ba29d3..8b8b489 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -24,7 +24,7 @@
#include "chrome/browser/autofill/phone_number_i18n.h"
#include "chrome/browser/autofill/validation.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/pref_names.h"
+#include "components/autofill/common/autofill_pref_names.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/autofill/risk/fingerprint_browsertest.cc b/chrome/browser/autofill/risk/fingerprint_browsertest.cc
index 2f7838a..0d43bab 100644
--- a/chrome/browser/autofill/risk/fingerprint_browsertest.cc
+++ b/chrome/browser/autofill/risk/fingerprint_browsertest.cc
@@ -8,7 +8,6 @@
#include "base/message_loop.h"
#include "base/port.h"
#include "chrome/browser/autofill/risk/proto/fingerprint.pb.h"
-#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
diff --git a/chrome/browser/autofill/wallet/wallet_service_url.cc b/chrome/browser/autofill/wallet/wallet_service_url.cc
index 07eddc2..5a32e85 100644
--- a/chrome/browser/autofill/wallet/wallet_service_url.cc
+++ b/chrome/browser/autofill/wallet/wallet_service_url.cc
@@ -7,7 +7,7 @@
#include <string>
#include "base/command_line.h"
-#include "chrome/common/chrome_switches.h"
+#include "components/autofill/common/autofill_switches.h"
#include "google_apis/gaia/gaia_urls.h"
#include "googleurl/src/gurl.h"
#include "net/base/url_util.h"
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 8cf2c15..77c71ea 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -125,9 +125,6 @@ const char kAuthServerWhitelist[] = "auth-server-whitelist";
// computer startup and not by some user action.
const char kAutoLaunchAtStartup[] = "auto-launch-at-startup";
-// Flag used to tell Chrome the base url of the Autofill service.
-const char kAutofillServiceUrl[] = "autofill-service-url";
-
// The value of this switch tells the app to listen for and broadcast
// automation-related messages on IPC channel with the given ID.
const char kAutomationClientChannelID[] = "automation-channel";
@@ -491,10 +488,6 @@ const char kEasyOffStoreExtensionInstall[] = "easy-off-store-extension-install";
const char kEnableExperimentalExtensionApis[] =
"enable-experimental-extension-apis";
-// Enable autofill for new elements like checkboxes. crbug.com/157636
-const char kEnableExperimentalFormFilling[] =
- "enable-experimental-form-filling";
-
// Enables logging for extension activity.
const char kEnableExtensionActivityLogging[] =
"enable-extension-activity-logging";
@@ -781,7 +774,7 @@ const char kHstsHosts[] = "hsts-hosts";
// Causes net::URLFetchers to ignore requests for SSL client certificates,
// causing them to attempt an unauthenticated SSL/TLS session. This is intended
// for use when testing various service URLs (eg: kPromoServerURL, kInstantURL,
-// kSbURLPrefix, kSyncServiceURL, kWalletServiceUrl, etc)
+// kSbURLPrefix, kSyncServiceURL, etc)
const char kIgnoreUrlFetcherCertRequests[] =
"ignore-urlfetcher-cert-requests";
@@ -1213,9 +1206,6 @@ const char kSetToken[] = "set-token";
// If true the app list will be shown.
const char kShowAppList[] = "show-app-list";
-// Annotates forms with Autofill field type predictions.
-const char kShowAutofillTypePredictions[] = "show-autofill-type-predictions";
-
// Makes component extensions appear in chrome://settings/extensions.
const char kShowComponentExtensionOptions[] =
"show-component-extension-options";
@@ -1402,14 +1392,6 @@ const char kViewerConnection[] = "viewer-connection";
// Cycle through a series of URLs listed in the specified file.
const char kVisitURLs[] = "visit-urls";
-// Secure service URL for Online Wallet service. Used as the base url to escrow
-// credit card numbers.
-const char kWalletSecureServiceUrl[] = "wallet-secure-service-url";
-
-// Service URL for Online Wallet service. Used as the base url for Online Wallet
-// API calls.
-const char kWalletServiceUrl[] = "wallet-service-url";
-
// Enable the "native services" feature of web-intents.
const char kWebIntentsNativeServicesEnabled[] =
"web-intents-native-services-enabled";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 5e0895d..8e7916d 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -10,14 +10,15 @@
#include "build/build_config.h"
#include "base/base_switches.h"
+#include "components/autofill/common/autofill_switches.h"
#include "content/public/common/content_switches.h"
namespace switches {
// -----------------------------------------------------------------------------
// Can't find the switch you are looking for? Try looking in
-// ui/gl/gl_switches.cc or base/base_switches.cc or
-// content/public/common/content_switches.cc or media/base/media_switches.cc
+// media/base/media_switches.cc or ui/gl/gl_switches.cc or one of the
+// .cc files corresponding to the *_switches.h files included above
// instead.
// -----------------------------------------------------------------------------
@@ -50,7 +51,6 @@ extern const char kAuthNegotiateDelegateWhitelist[];
extern const char kAuthSchemes[];
extern const char kAuthServerWhitelist[];
extern const char kAutoLaunchAtStartup[];
-extern const char kAutofillServiceUrl[];
extern const char kAutomationClientChannelID[];
extern const char kAutomationReinitializeOnChannelError[];
extern const char kCheckForUpdateIntervalSec[];
@@ -142,7 +142,6 @@ extern const char kEnableCrxlessWebApps[];
extern const char kEnableDesktopGuestMode[];
extern const char kEnableDevToolsExperiments[];
extern const char kEnableExperimentalExtensionApis[];
-extern const char kEnableExperimentalFormFilling[];
extern const char kEnableExtensionActivityLogging[];
extern const char kEnableExtensionActivityUI[];
extern const char kEnableFileCookies[];
@@ -323,7 +322,6 @@ extern const char kSideloadWipeout[];
extern const char kSilentLaunch[];
extern const char kSetToken[];
extern const char kShowAppList[];
-extern const char kShowAutofillTypePredictions[];
extern const char kShowComponentExtensionOptions[];
extern const char kShowIcons[];
extern const char kSigninProcess[];
@@ -374,8 +372,6 @@ extern const char kVariationsServerURL[];
extern const char kVersion[];
extern const char kViewerConnection[];
extern const char kVisitURLs[];
-extern const char kWalletSecureServiceUrl[];
-extern const char kWalletServiceUrl[];
extern const char kWebIntentsNativeServicesEnabled[];
extern const char kWhitelistedExtensionID[];
extern const char kWindowPosition[];
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 0efb43c..d2f35e2 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -340,9 +340,6 @@ const char kPasswordManagerEnabled[] = "profile.password_manager_enabled";
const char kPasswordManagerAllowShowPasswords[] =
"profile.password_manager_allow_show_passwords";
-// Boolean that is true when password generation is enabled.
-const char kPasswordGenerationEnabled[] = "password_generation.enabled";
-
// Booleans identifying whether normal and reverse auto-logins are enabled.
const char kAutologinEnabled[] = "autologin.enabled";
const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
@@ -1100,20 +1097,6 @@ const char kPerHostZoomLevels[] = "profile.per_host_zoom_levels";
// (but not cancel). If this isn't set, the dialog assumes it's the first run.
const char kAutofillDialogPayWithoutWallet[] = "autofill.pay_without_wallet";
-// Boolean that is true if Autofill is enabled and allowed to save profile data.
-const char kAutofillEnabled[] = "autofill.enabled";
-
-// Boolean that is true when auxiliary Autofill profiles are enabled.
-// Currently applies to Address Book "me" card on Mac. False on Win and Linux.
-const char kAutofillAuxiliaryProfilesEnabled[] =
- "autofill.auxiliary_profiles_enabled";
-
-// Double that indicates positive (for matched forms) upload rate.
-const char kAutofillPositiveUploadRate[] = "autofill.positive_upload_rate";
-
-// Double that indicates negative (for not matched forms) upload rate.
-const char kAutofillNegativeUploadRate[] = "autofill.negative_upload_rate";
-
// Modifying bookmarks is completely disabled when this is set to false.
const char kEditBookmarksEnabled[] = "bookmarks.editing_enabled";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index c77fa24..5d18c8f 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -11,6 +11,8 @@
#include "build/build_config.h"
+#include "components/autofill/common/autofill_pref_names.h"
+
namespace prefs {
// Profile prefs. Please add Local State prefs below instead.
@@ -149,7 +151,6 @@ extern const char kWebKitForceEnableZoom[];
#endif
extern const char kPasswordManagerEnabled[];
extern const char kPasswordManagerAllowShowPasswords[];
-extern const char kPasswordGenerationEnabled[];
extern const char kAutologinEnabled[];
extern const char kReverseAutologinEnabled[];
extern const char kReverseAutologinRejectedEmailList[];
@@ -381,10 +382,6 @@ extern const char kClearSiteDataOnExit[];
extern const char kDefaultZoomLevel[];
extern const char kPerHostZoomLevels[];
extern const char kAutofillDialogPayWithoutWallet[];
-extern const char kAutofillEnabled[];
-extern const char kAutofillAuxiliaryProfilesEnabled[];
-extern const char kAutofillPositiveUploadRate[];
-extern const char kAutofillNegativeUploadRate[];
extern const char kEditBookmarksEnabled[];
extern const char kEnableTranslate[];
diff --git a/chrome/renderer/autofill/DEPS b/chrome/renderer/autofill/DEPS
index 78af89d..d31bfe2 100644
--- a/chrome/renderer/autofill/DEPS
+++ b/chrome/renderer/autofill/DEPS
@@ -1,23 +1,13 @@
-# TODO(joi): Most of these are only required until the Autofill
-# renderer code moves to //components/autofill/renderer and common
-# code to //components/autofill/common, at which point we'll have much
-# simpler DEPS.
include_rules = [
+ # TODO(joi): These are only required until the render code for
+ # Autofill moves to //components/autofill/renderer.
"-chrome/common",
"-chrome/renderer",
"+chrome/renderer/autofill",
"+chrome/renderer/page_click_listener.h",
- "+chrome/common/autofill/autocheckout_status.h",
- "+chrome/common/autofill/web_element_descriptor.h",
- "+chrome/common/autofill_messages.h",
- "+chrome/common/form_data.h",
- "+chrome/common/form_data_predictions.h",
- "+chrome/common/form_field_data.h",
- "+chrome/common/form_field_data_predictions.h",
- "+chrome/common/password_form_fill_data.h",
+
+ # TODO(joi): Get rid of this dependency.
"+chrome/common/password_generation_util.h",
- "+google_apis/gaia/gaia_urls.h",
- # TODO(joi): Get rid of this by extracting Autofill-specific switches.
- "!chrome/common/chrome_switches.h",
+ "+google_apis/gaia/gaia_urls.h",
]
diff --git a/chrome/renderer/autofill/form_autofill_util.cc b/chrome/renderer/autofill/form_autofill_util.cc
index 233d568..f275b3c 100644
--- a/chrome/renderer/autofill/form_autofill_util.cc
+++ b/chrome/renderer/autofill/form_autofill_util.cc
@@ -11,7 +11,7 @@
#include "base/memory/scoped_vector.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/common/chrome_switches.h"
+#include "components/autofill/common/autofill_switches.h"
#include "components/autofill/common/form_data.h"
#include "components/autofill/common/form_field_data.h"
#include "components/autofill/common/web_element_descriptor.h"
diff --git a/components/autofill.gypi b/components/autofill.gypi
index 26b480f..7b180af 100644
--- a/components/autofill.gypi
+++ b/components/autofill.gypi
@@ -23,6 +23,10 @@
'sources': [
'autofill/common/autocheckout_status.h',
'autofill/common/autofill_messages.h',
+ 'autofill/common/autofill_pref_names.cc',
+ 'autofill/common/autofill_pref_names.h',
+ 'autofill/common/autofill_switches.cc',
+ 'autofill/common/autofill_switches.h',
'autofill/common/form_data.cc',
'autofill/common/form_data.h',
'autofill/common/form_data_predictions.cc',
diff --git a/components/autofill/common/autofill_pref_names.cc b/components/autofill/common/autofill_pref_names.cc
new file mode 100644
index 0000000..5f86a97
--- /dev/null
+++ b/components/autofill/common/autofill_pref_names.cc
@@ -0,0 +1,26 @@
+// Copyright 2013 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 "components/autofill/common/autofill_pref_names.h"
+
+namespace prefs {
+
+// Boolean that is true when auxiliary Autofill profiles are enabled.
+// Currently applies to Address Book "me" card on Mac. False on Win and Linux.
+const char kAutofillAuxiliaryProfilesEnabled[] =
+ "autofill.auxiliary_profiles_enabled";
+
+// Boolean that is true if Autofill is enabled and allowed to save profile data.
+const char kAutofillEnabled[] = "autofill.enabled";
+
+// Double that indicates negative (for not matched forms) upload rate.
+const char kAutofillNegativeUploadRate[] = "autofill.negative_upload_rate";
+
+// Double that indicates positive (for matched forms) upload rate.
+const char kAutofillPositiveUploadRate[] = "autofill.positive_upload_rate";
+
+// Boolean that is true when password generation is enabled.
+const char kPasswordGenerationEnabled[] = "password_generation.enabled";
+
+} // namespace prefs
diff --git a/components/autofill/common/autofill_pref_names.h b/components/autofill/common/autofill_pref_names.h
new file mode 100644
index 0000000..083bbe9
--- /dev/null
+++ b/components/autofill/common/autofill_pref_names.h
@@ -0,0 +1,20 @@
+// Copyright 2013 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.
+
+#ifndef COMPONENTS_AUTOFILL_COMMON_AUTOFILL_PREF_NAMES_H_
+#define COMPONENTS_AUTOFILL_COMMON_AUTOFILL_PREF_NAMES_H_
+
+namespace prefs {
+
+// Alphabetical list of preference names specific to the Autofill
+// component. Keep alphabetized, and document each in the .cc file.
+extern const char kAutofillAuxiliaryProfilesEnabled[];
+extern const char kAutofillEnabled[];
+extern const char kAutofillNegativeUploadRate[];
+extern const char kAutofillPositiveUploadRate[];
+extern const char kPasswordGenerationEnabled[];
+
+} // namespace prefs
+
+#endif // COMPONENTS_AUTOFILL_COMMON_AUTOFILL_PREF_NAMES_H_
diff --git a/components/autofill/common/autofill_switches.cc b/components/autofill/common/autofill_switches.cc
new file mode 100644
index 0000000..7f6f227
--- /dev/null
+++ b/components/autofill/common/autofill_switches.cc
@@ -0,0 +1,27 @@
+// Copyright 2013 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 "components/autofill/common/autofill_switches.h"
+
+namespace switches {
+
+// Flag used to tell Chrome the base url of the Autofill service.
+const char kAutofillServiceUrl[] = "autofill-service-url";
+
+// Enable autofill for new elements like checkboxes. crbug.com/157636
+const char kEnableExperimentalFormFilling[] =
+ "enable-experimental-form-filling";
+
+// Annotates forms with Autofill field type predictions.
+const char kShowAutofillTypePredictions[] = "show-autofill-type-predictions";
+
+// Secure service URL for Online Wallet service. Used as the base url to escrow
+// credit card numbers.
+const char kWalletSecureServiceUrl[] = "wallet-secure-service-url";
+
+// Service URL for Online Wallet service. Used as the base url for Online Wallet
+// API calls.
+const char kWalletServiceUrl[] = "wallet-service-url";
+
+} // namespace switches
diff --git a/components/autofill/common/autofill_switches.h b/components/autofill/common/autofill_switches.h
new file mode 100644
index 0000000..8814ba7
--- /dev/null
+++ b/components/autofill/common/autofill_switches.h
@@ -0,0 +1,20 @@
+// Copyright 2013 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.
+
+#ifndef COMPONENTS_AUTOFILL_COMMON_AUTOFILL_SWITCHES_H_
+#define COMPONENTS_AUTOFILL_COMMON_AUTOFILL_SWITCHES_H_
+
+namespace switches {
+
+// All switches in alphabetical order. The switches should be documented
+// alongside the definition of their values in the .cc file.
+extern const char kAutofillServiceUrl[];
+extern const char kEnableExperimentalFormFilling[];
+extern const char kShowAutofillTypePredictions[];
+extern const char kWalletSecureServiceUrl[];
+extern const char kWalletServiceUrl[];
+
+} // namespace switches
+
+#endif // COMPONENTS_AUTOFILL_COMMON_AUTOFILL_SWITCHES_H_