autofill: Rename all the entries remaining with AutoFill to Autofill.
[email protected],[email protected]
BUG=72758
TEST=existing unit_tests
Review URL: http://codereview.chromium.org/6688053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78856 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autofill/address.cc b/chrome/browser/autofill/address.cc
index 7531d781..d00bfa94 100644
--- a/chrome/browser/autofill/address.cc
+++ b/chrome/browser/autofill/address.cc
@@ -14,7 +14,7 @@
const char16 kAddressSplitChars[] = {'-', ',', '#', '.', ' ', 0};
-const AutofillType::FieldTypeSubGroup kAutoFillAddressTypes[] = {
+const AutofillType::FieldTypeSubGroup kAutofillAddressTypes[] = {
AutofillType::ADDRESS_LINE1,
AutofillType::ADDRESS_LINE2,
AutofillType::ADDRESS_CITY,
@@ -23,7 +23,7 @@
AutofillType::ADDRESS_COUNTRY,
};
-const int kAutoFillAddressLength = arraysize(kAutoFillAddressTypes);
+const int kAutofillAddressLength = arraysize(kAutofillAddressTypes);
} // namespace
@@ -107,8 +107,8 @@
string16 match;
if (type == UNKNOWN_TYPE) {
- for (int i = 0; i < kAutoFillAddressLength; ++i) {
- if (FindInfoMatchesHelper(kAutoFillAddressTypes[i], info, &match))
+ for (int i = 0; i < kAutofillAddressLength; ++i) {
+ if (FindInfoMatchesHelper(kAutofillAddressTypes[i], info, &match))
matched_text->push_back(match);
}
} else {
diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc
index 5d4d0ccc..8adbafa 100644
--- a/chrome/browser/autofill/address_field.cc
+++ b/chrome/browser/autofill/address_field.cc
@@ -24,7 +24,7 @@
switch (type_) {
case kShippingAddress:
- // Fall through. AutoFill does not support shipping addresses.
+ // Fall through. Autofill does not support shipping addresses.
case kGenericAddress:
address_company = COMPANY_NAME;
address_line1 = ADDRESS_HOME_LINE1;
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 4001dd4..4c3e1f4 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -4,11 +4,11 @@
#include <string>
-#include "base/utf_string_conversions.h"
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_common_test.h"
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/personal_data_manager.h"
@@ -62,9 +62,9 @@
" <input type=\"text\" id=\"phone\" /><br />"
"</form>";
-class AutoFillTest : public InProcessBrowserTest {
+class AutofillTest : public InProcessBrowserTest {
protected:
- AutoFillTest() {
+ AutofillTest() {
set_show_window(true);
EnableDOMAutomation();
}
@@ -214,7 +214,7 @@
};
// Test that basic form fill is working.
-IN_PROC_BROWSER_TEST_F(AutoFillTest, BasicFormFill) {
+IN_PROC_BROWSER_TEST_F(AutofillTest, BasicFormFill) {
CreateTestProfile();
// Load the test page.
@@ -222,12 +222,12 @@
ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(),
GURL(std::string(kDataURIPrefix) + kTestFormString)));
- // Invoke AutoFill.
+ // Invoke Autofill.
TryBasicFormFill();
}
// Test that form filling can be initiated by pressing the down arrow.
-IN_PROC_BROWSER_TEST_F(AutoFillTest, AutoFillViaDownArrow) {
+IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillViaDownArrow) {
CreateTestProfile();
// Load the test page.
@@ -238,7 +238,7 @@
// Focus a fillable field.
FocusFirstNameField();
- // Press the down arrow to initiate AutoFill and wait for the popup to be
+ // Press the down arrow to initiate Autofill and wait for the popup to be
// shown.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
browser(), ui::VKEY_DOWN, false, false, false, false,
@@ -263,7 +263,7 @@
}
// Test that a JavaScript onchange event is fired after auto-filling a form.
-IN_PROC_BROWSER_TEST_F(AutoFillTest, OnChangeAfterAutoFill) {
+IN_PROC_BROWSER_TEST_F(AutofillTest, OnChangeAfterAutofill) {
CreateTestProfile();
const char* kOnChangeScript =
@@ -319,7 +319,7 @@
// Test that form filling works after reloading the current page.
// This test brought to you by http://crbug.com/69204
-IN_PROC_BROWSER_TEST_F(AutoFillTest, AutoFillAfterReload) {
+IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillAfterReload) {
CreateTestProfile();
// Load the test page.
@@ -333,12 +333,12 @@
controller->Reload(false);
ui_test_utils::WaitForLoadStop(controller);
- // Invoke AutoFill.
+ // Invoke Autofill.
TryBasicFormFill();
}
// Test that autofill works after page translation.
-IN_PROC_BROWSER_TEST_F(AutoFillTest, AutoFillAfterTranslate) {
+IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillAfterTranslate) {
CreateTestProfile();
GURL url(std::string(kDataURIPrefix) +
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
index 92c9787..f02b4fdb 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc
@@ -12,16 +12,16 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
-AutoFillCCInfoBarDelegate::AutoFillCCInfoBarDelegate(TabContents* tab_contents,
+AutofillCCInfoBarDelegate::AutofillCCInfoBarDelegate(TabContents* tab_contents,
AutofillManager* host)
: ConfirmInfoBarDelegate(tab_contents),
host_(host) {
}
-AutoFillCCInfoBarDelegate::~AutoFillCCInfoBarDelegate() {
+AutofillCCInfoBarDelegate::~AutofillCCInfoBarDelegate() {
}
-bool AutoFillCCInfoBarDelegate::ShouldExpire(
+bool AutofillCCInfoBarDelegate::ShouldExpire(
const NavigationController::LoadCommittedDetails& details) const {
// The user has submitted a form, causing the page to navigate elsewhere. We
// don't want the infobar to be expired at this point, because the user won't
@@ -29,7 +29,7 @@
return false;
}
-void AutoFillCCInfoBarDelegate::InfoBarClosed() {
+void AutofillCCInfoBarDelegate::InfoBarClosed() {
if (host_) {
host_->OnInfoBarClosed(false);
host_ = NULL;
@@ -37,26 +37,26 @@
delete this;
}
-SkBitmap* AutoFillCCInfoBarDelegate::GetIcon() const {
+SkBitmap* AutofillCCInfoBarDelegate::GetIcon() const {
return ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_INFOBAR_AUTOFILL);
}
-InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() const {
+InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() const {
return PAGE_ACTION_TYPE;
}
-string16 AutoFillCCInfoBarDelegate::GetMessageText() const {
+string16 AutofillCCInfoBarDelegate::GetMessageText() const {
return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_TEXT);
}
-string16 AutoFillCCInfoBarDelegate::GetButtonLabel(InfoBarButton button) const {
+string16 AutofillCCInfoBarDelegate::GetButtonLabel(InfoBarButton button) const {
return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
IDS_AUTOFILL_CC_INFOBAR_ACCEPT : IDS_AUTOFILL_CC_INFOBAR_DENY);
}
-bool AutoFillCCInfoBarDelegate::Accept() {
- UMA_HISTOGRAM_COUNTS("AutoFill.CCInfoBarAccepted", 1);
+bool AutofillCCInfoBarDelegate::Accept() {
+ UMA_HISTOGRAM_COUNTS("Autofill.CCInfoBarAccepted", 1);
if (host_) {
host_->OnInfoBarClosed(true);
host_ = NULL;
@@ -64,18 +64,18 @@
return true;
}
-bool AutoFillCCInfoBarDelegate::Cancel() {
- UMA_HISTOGRAM_COUNTS("AutoFill.CCInfoBarDenied", 1);
+bool AutofillCCInfoBarDelegate::Cancel() {
+ UMA_HISTOGRAM_COUNTS("Autofill.CCInfoBarDenied", 1);
return true;
}
-string16 AutoFillCCInfoBarDelegate::GetLinkText() {
+string16 AutofillCCInfoBarDelegate::GetLinkText() {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
-bool AutoFillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
Browser* browser = BrowserList::GetLastActive();
DCHECK(browser);
- browser->OpenAutoFillHelpTabAndActivate();
+ browser->OpenAutofillHelpTabAndActivate();
return false;
}
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
index 24e6f471..1077458f 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h
+++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h
@@ -13,12 +13,12 @@
// An InfoBar delegate that enables the user to allow or deny storing credit
// card information gathered from a form submission.
-class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
+class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutofillManager* host);
+ AutofillCCInfoBarDelegate(TabContents* tab_contents, AutofillManager* host);
private:
- virtual ~AutoFillCCInfoBarDelegate();
+ virtual ~AutofillCCInfoBarDelegate();
// ConfirmInfoBarDelegate:
virtual bool ShouldExpire(
@@ -36,7 +36,7 @@
// The AutofillManager that initiated this InfoBar.
AutofillManager* host_;
- DISALLOW_COPY_AND_ASSIGN(AutoFillCCInfoBarDelegate);
+ DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate);
};
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/autofill/autofill_common_test.cc b/chrome/browser/autofill/autofill_common_test.cc
index bb1f535..a16b6bb 100644
--- a/chrome/browser/autofill/autofill_common_test.cc
+++ b/chrome/browser/autofill/autofill_common_test.cc
@@ -83,7 +83,7 @@
// Disable auxiliary profiles for unit testing. These reach out to system
// services on the Mac.
if (profile) {
- profile->GetPrefs()->SetBoolean(prefs::kAutoFillAuxiliaryProfilesEnabled,
+ profile->GetPrefs()->SetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled,
false);
}
}
diff --git a/chrome/browser/autofill/autofill_common_test.h b/chrome/browser/autofill/autofill_common_test.h
index 0d977f8..db42140 100644
--- a/chrome/browser/autofill/autofill_common_test.h
+++ b/chrome/browser/autofill/autofill_common_test.h
@@ -14,7 +14,7 @@
struct FormField;
} // namespace webkit_glue
-// Common utilities shared amongst AutoFill tests.
+// Common utilities shared amongst Autofill tests.
namespace autofill_test {
// Provides a quick way to populate a FormField with c-strings.
@@ -24,7 +24,7 @@
const char* type,
webkit_glue::FormField* field);
-// A unit testing utility that is common to a number of the AutoFill unit
+// A unit testing utility that is common to a number of the Autofill unit
// tests. |SetProfileInfo| provides a quick way to populate a profile with
// c-strings.
void SetProfileInfo(AutofillProfile* profile,
@@ -41,7 +41,7 @@
const char* state, const char* zipcode, const char* country,
const char* phone, const char* fax);
-// A unit testing utility that is common to a number of the AutoFill unit
+// A unit testing utility that is common to a number of the Autofill unit
// tests. |SetCreditCardInfo| provides a quick way to populate a credit card
// with c-strings.
void SetCreditCardInfo(CreditCard* credit_card,
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
index 3583f73..dcca2a7 100644
--- a/chrome/browser/autofill/autofill_download.cc
+++ b/chrome/browser/autofill/autofill_download.cc
@@ -45,9 +45,9 @@
if (profile_) {
PrefService* preferences = profile_->GetPrefs();
positive_upload_rate_ =
- preferences->GetDouble(prefs::kAutoFillPositiveUploadRate);
+ preferences->GetDouble(prefs::kAutofillPositiveUploadRate);
negative_upload_rate_ =
- preferences->GetDouble(prefs::kAutoFillNegativeUploadRate);
+ preferences->GetDouble(prefs::kAutofillNegativeUploadRate);
}
}
@@ -156,7 +156,7 @@
DCHECK_LE(rate, 1.0);
DCHECK(profile_);
PrefService* preferences = profile_->GetPrefs();
- preferences->SetDouble(prefs::kAutoFillPositiveUploadRate, rate);
+ preferences->SetDouble(prefs::kAutofillPositiveUploadRate, rate);
}
void AutofillDownloadManager::SetNegativeUploadRate(double rate) {
@@ -167,7 +167,7 @@
DCHECK_LE(rate, 1.0);
DCHECK(profile_);
PrefService* preferences = profile_->GetPrefs();
- preferences->SetDouble(prefs::kAutoFillNegativeUploadRate, rate);
+ preferences->SetDouble(prefs::kAutofillNegativeUploadRate, rate);
}
bool AutofillDownloadManager::StartRequest(
@@ -324,7 +324,7 @@
} else {
double new_positive_upload_rate = 0;
double new_negative_upload_rate = 0;
- AutoFillUploadXmlParser parse_handler(&new_positive_upload_rate,
+ AutofillUploadXmlParser parse_handler(&new_positive_upload_rate,
&new_negative_upload_rate);
buzz::XmlParser parser(&parse_handler);
parser.Parse(data.data(), data.length(), true);
diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc
index 188d8b24..7878aa7 100644
--- a/chrome/browser/autofill/autofill_download_unittest.cc
+++ b/chrome/browser/autofill/autofill_download_unittest.cc
@@ -112,9 +112,9 @@
scoped_refptr<URLRequestContextGetter> request_context_getter;
};
-typedef TestingBrowserProcessTest AutoFillDownloadTest;
+typedef TestingBrowserProcessTest AutofillDownloadTest;
-TEST_F(AutoFillDownloadTest, QueryAndUploadTest) {
+TEST_F(AutofillDownloadTest, QueryAndUploadTest) {
MessageLoopForUI message_loop;
// Create and register factory.
AutofillDownloadTestHelper helper;
@@ -357,7 +357,7 @@
URLFetcher::set_factory(NULL);
}
-TEST_F(AutoFillDownloadTest, CacheQueryTest) {
+TEST_F(AutofillDownloadTest, CacheQueryTest) {
MessageLoopForUI message_loop;
AutofillDownloadTestHelper helper;
// Create and register factory.
diff --git a/chrome/browser/autofill/autofill_field.h b/chrome/browser/autofill/autofill_field.h
index 9eb77c84..f1000a09 100644
--- a/chrome/browser/autofill/autofill_field.h
+++ b/chrome/browser/autofill/autofill_field.h
@@ -48,10 +48,10 @@
bool IsFieldFillable() const;
private:
- // The unique name of this field, generated by AutoFill.
+ // The unique name of this field, generated by Autofill.
string16 unique_name_;
- // The type of the field, as determined by the AutoFill server.
+ // The type of the field, as determined by the Autofill server.
AutofillFieldType server_type_;
// The type of the field, as determined by the local heuristics.
diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
index 6ff6e33..3ed1cf1 100644
--- a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
+++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
@@ -145,9 +145,9 @@
// Imports profiles from the IE toolbar and stores them. Asynchronous
// if PersonalDataManager has not been loaded yet. Deletes itself on completion.
-class AutoFillImporter : public PersonalDataManager::Observer {
+class AutofillImporter : public PersonalDataManager::Observer {
public:
- explicit AutoFillImporter(PersonalDataManager* personal_data_manager)
+ explicit AutofillImporter(PersonalDataManager* personal_data_manager)
: personal_data_manager_(personal_data_manager) {
personal_data_manager_->SetObserver(this);
}
@@ -172,7 +172,7 @@
}
private:
- ~AutoFillImporter() {
+ ~AutofillImporter() {
personal_data_manager_->RemoveObserver(this);
}
@@ -183,7 +183,7 @@
} // namespace
-// Imports AutoFill profiles and credit cards from IE Toolbar if present and not
+// Imports Autofill profiles and credit cards from IE Toolbar if present and not
// password protected. Returns true if data is successfully retrieved. False if
// there is no data, data is password protected or error occurred.
bool ImportCurrentUserProfiles(std::vector<AutofillProfile>* profiles,
@@ -252,7 +252,7 @@
// In incognito mode we do not have PDM - and we should not import anything.
if (!pdm)
return false;
- AutoFillImporter *importer = new AutoFillImporter(pdm);
+ AutofillImporter *importer = new AutofillImporter(pdm);
// importer will self delete.
return importer->ImportProfiles();
}
diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc
index 46f02a3..b1150383 100644
--- a/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc
+++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc
@@ -140,7 +140,7 @@
key.DeleteKey(L"");
}
-TEST_F(AutofillIeToolbarImportTest, TestAutoFillImport) {
+TEST_F(AutofillIeToolbarImportTest, TestAutofillImport) {
RegKey profile_key;
profile_key.Create(HKEY_CURRENT_USER, kProfileKey, KEY_ALL_ACCESS);
EXPECT_TRUE(profile_key.Valid());
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 35b6f25..8fc60dc 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -42,8 +42,8 @@
// We only send a fraction of the forms to upload server.
// The rate for positive/negative matches potentially could be different.
-const double kAutoFillPositiveUploadRateDefaultValue = 0.01;
-const double kAutoFillNegativeUploadRateDefaultValue = 0.01;
+const double kAutofillPositiveUploadRateDefaultValue = 0.01;
+const double kAutofillNegativeUploadRateDefaultValue = 0.01;
const string16::value_type kCreditCardPrefix[] = {'*', 0};
const string16::value_type kLabelSeparator[] = {';', ' ', '*', 0};
@@ -165,12 +165,12 @@
// logical form. Returns true if the relevant portion of |form| is auto-filled.
// The "relevant" fields in |form| are ones corresponding to fields in
// |form_structure| with indices in the range [section_start, section_end).
-bool SectionIsAutoFilled(const FormStructure* form_structure,
+bool SectionIsAutofilled(const FormStructure* form_structure,
const webkit_glue::FormData& form,
size_t section_start,
size_t section_end) {
// TODO(isherman): It would be nice to share most of this code with the loop
- // in |FillAutoFillFormData()|, but I don't see a particularly clean way to do
+ // in |FillAutofillFormData()|, but I don't see a particularly clean way to do
// that.
// The list of fields in |form_structure| and |form.fields| often match
@@ -231,21 +231,21 @@
// static
void AutofillManager::RegisterBrowserPrefs(PrefService* prefs) {
- prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement);
+ prefs->RegisterDictionaryPref(prefs::kAutofillDialogPlacement);
}
// static
void AutofillManager::RegisterUserPrefs(PrefService* prefs) {
- prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true);
+ prefs->RegisterBooleanPref(prefs::kAutofillEnabled, true);
#if defined(OS_MACOSX)
- prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true);
+ prefs->RegisterBooleanPref(prefs::kAutofillAuxiliaryProfilesEnabled, true);
#else
- prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, false);
+ prefs->RegisterBooleanPref(prefs::kAutofillAuxiliaryProfilesEnabled, false);
#endif
- prefs->RegisterDoublePref(prefs::kAutoFillPositiveUploadRate,
- kAutoFillPositiveUploadRateDefaultValue);
- prefs->RegisterDoublePref(prefs::kAutoFillNegativeUploadRate,
- kAutoFillNegativeUploadRateDefaultValue);
+ prefs->RegisterDoublePref(prefs::kAutofillPositiveUploadRate,
+ kAutofillPositiveUploadRateDefaultValue);
+ prefs->RegisterDoublePref(prefs::kAutofillNegativeUploadRate,
+ kAutofillNegativeUploadRateDefaultValue);
}
void AutofillManager::DidNavigateMainFramePostCommit(
@@ -257,18 +257,18 @@
bool AutofillManager::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AutofillManager, message)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_FormsSeen, OnFormsSeen)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_FormSubmitted, OnFormSubmitted)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_QueryFormFieldAutoFill,
- OnQueryFormFieldAutoFill)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_ShowAutoFillDialog,
- OnShowAutoFillDialog)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_FillAutoFillFormData,
- OnFillAutoFillFormData)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_DidFillAutoFillFormData,
- OnDidFillAutoFillFormData)
- IPC_MESSAGE_HANDLER(AutoFillHostMsg_DidShowAutoFillSuggestions,
- OnDidShowAutoFillSuggestions)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_FormsSeen, OnFormsSeen)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_FormSubmitted, OnFormSubmitted)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_QueryFormFieldAutofill,
+ OnQueryFormFieldAutofill)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_ShowAutofillDialog,
+ OnShowAutofillDialog)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_FillAutofillFormData,
+ OnFillAutofillFormData)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_DidFillAutofillFormData,
+ OnDidFillAutofillFormData)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_DidShowAutofillSuggestions,
+ OnDidShowAutofillSuggestions)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -279,7 +279,7 @@
// Let AutoComplete know as well.
tab_contents()->autocomplete_history_manager()->OnFormSubmitted(form);
- if (!IsAutoFillEnabled())
+ if (!IsAutofillEnabled())
return;
if (tab_contents()->profile()->IsOffTheRecord())
@@ -302,20 +302,20 @@
UploadFormData(submitted_form);
submitted_form.DetermineHeuristicTypes();
- if (!submitted_form.IsAutoFillable(true))
+ if (!submitted_form.IsAutofillable(true))
return;
ImportFormData(submitted_form);
}
void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms) {
- if (!IsAutoFillEnabled())
+ if (!IsAutofillEnabled())
return;
ParseForms(forms);
}
-void AutofillManager::OnQueryFormFieldAutoFill(
+void AutofillManager::OnQueryFormFieldAutofill(
int query_id,
const webkit_glue::FormData& form,
const webkit_glue::FormField& field) {
@@ -331,7 +331,7 @@
personal_data_->profiles(), personal_data_->credit_cards(), &host) &&
FindCachedFormAndField(form, field, &form_structure, &autofill_field) &&
// Don't send suggestions for forms that aren't auto-fillable.
- form_structure->IsAutoFillable(false)) {
+ form_structure->IsAutofillable(false)) {
AutofillFieldType type = autofill_field->type();
bool is_filling_credit_card =
(AutofillType(type).group() == AutofillType::CREDIT_CARD);
@@ -348,11 +348,11 @@
DCHECK_EQ(values.size(), unique_ids.size());
if (!values.empty()) {
- // Don't provide AutoFill suggestions when AutoFill is disabled, and don't
+ // Don't provide Autofill suggestions when Autofill is disabled, and don't
// provide credit card suggestions for non-HTTPS pages. However, provide a
// warning to the user in these cases.
int warning = 0;
- if (!form_structure->IsAutoFillable(true))
+ if (!form_structure->IsAutofillable(true))
warning = IDS_AUTOFILL_WARNING_FORM_DISABLED;
else if (is_filling_credit_card && !FormIsHTTPS(form_structure))
warning = IDS_AUTOFILL_WARNING_INSECURE_CONNECTION;
@@ -365,7 +365,7 @@
size_t section_start, section_end;
FindSectionBounds(*form_structure, *autofill_field,
is_filling_credit_card, §ion_start, §ion_end);
- if (SectionIsAutoFilled(form_structure, form, section_start,
+ if (SectionIsAutofilled(form_structure, form, section_start,
section_end)) {
// If the relevant section is auto-filled and the renderer is querying
// for suggestions, then the user is editing the value of a field.
@@ -387,7 +387,7 @@
query_id, field.name, field.value, values, labels, icons, unique_ids);
}
-void AutofillManager::OnFillAutoFillFormData(int query_id,
+void AutofillManager::OnFillAutofillFormData(int query_id,
const FormData& form,
const FormField& field,
int unique_id) {
@@ -448,7 +448,7 @@
// If the relevant section is auto-filled, we should fill |field| but not the
// rest of the form.
- if (SectionIsAutoFilled(form_structure, form, section_start, section_end)) {
+ if (SectionIsAutofilled(form_structure, form, section_start, section_end)) {
for (std::vector<FormField>::iterator iter = result.fields.begin();
iter != result.fields.end(); ++iter) {
if ((*iter) == field) {
@@ -466,7 +466,7 @@
}
}
- host->Send(new AutoFillMsg_FormDataFilled(host->routing_id(), query_id,
+ host->Send(new AutofillMsg_FormDataFilled(host->routing_id(), query_id,
result));
return;
}
@@ -510,24 +510,24 @@
}
autofilled_forms_signatures_.push_front(form_structure->FormSignature());
- host->Send(new AutoFillMsg_FormDataFilled(
+ host->Send(new AutofillMsg_FormDataFilled(
host->routing_id(), query_id, result));
}
-void AutofillManager::OnShowAutoFillDialog() {
+void AutofillManager::OnShowAutofillDialog() {
Browser* browser = BrowserList::GetLastActive();
if (browser)
- browser->ShowOptionsTab(chrome::kAutoFillSubPage);
+ browser->ShowOptionsTab(chrome::kAutofillSubPage);
}
-void AutofillManager::OnDidFillAutoFillFormData() {
+void AutofillManager::OnDidFillAutofillFormData() {
NotificationService::current()->Notify(
NotificationType::AUTOFILL_DID_FILL_FORM_DATA,
Source<RenderViewHost>(tab_contents()->render_view_host()),
NotificationService::NoDetails());
}
-void AutofillManager::OnDidShowAutoFillSuggestions() {
+void AutofillManager::OnDidShowAutofillSuggestions() {
NotificationService::current()->Notify(
NotificationType::AUTOFILL_DID_SHOW_SUGGESTIONS,
Source<RenderViewHost>(tab_contents()->render_view_host()),
@@ -554,19 +554,19 @@
int http_error) {
}
-bool AutofillManager::IsAutoFillEnabled() const {
+bool AutofillManager::IsAutofillEnabled() const {
PrefService* prefs =
const_cast<AutofillManager*>(this)->tab_contents()->profile()->GetPrefs();
- // Migrate obsolete AutoFill pref.
+ // Migrate obsolete Autofill pref.
if (prefs->FindPreference(prefs::kFormAutofillEnabled)) {
bool enabled = prefs->GetBoolean(prefs::kFormAutofillEnabled);
prefs->ClearPref(prefs::kFormAutofillEnabled);
- prefs->SetBoolean(prefs::kAutoFillEnabled, enabled);
+ prefs->SetBoolean(prefs::kAutofillEnabled, enabled);
return enabled;
}
- return prefs->GetBoolean(prefs::kAutoFillEnabled);
+ return prefs->GetBoolean(prefs::kAutofillEnabled);
}
void AutofillManager::DeterminePossibleFieldTypesForUpload(
@@ -605,7 +605,7 @@
// it.
if (imported_credit_card && tab_contents()) {
imported_credit_card_.reset(imported_credit_card);
- tab_contents()->AddInfoBar(new AutoFillCCInfoBarDelegate(tab_contents(),
+ tab_contents()->AddInfoBar(new AutofillCCInfoBarDelegate(tab_contents(),
this));
}
}
@@ -660,7 +660,7 @@
bool AutofillManager::GetHost(const std::vector<AutofillProfile*>& profiles,
const std::vector<CreditCard*>& credit_cards,
RenderViewHost** host) const {
- if (!IsAutoFillEnabled())
+ if (!IsAutofillEnabled())
return false;
// No autofill data to return if the profiles are empty.
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 7770d8c..8d47351 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -17,7 +17,7 @@
#include "chrome/browser/autofill/personal_data_manager.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-class AutoFillCCInfoBarDelegate;
+class AutofillCCInfoBarDelegate;
class AutofillProfile;
class AutofillMetrics;
class CreditCard;
@@ -50,7 +50,7 @@
const ViewHostMsg_FrameNavigate_Params& params);
virtual bool OnMessageReceived(const IPC::Message& message);
- // Called by the AutoFillCCInfoBarDelegate when the user interacts with the
+ // Called by the AutofillCCInfoBarDelegate when the user interacts with the
// infobar.
virtual void OnInfoBarClosed(bool should_save);
@@ -62,8 +62,8 @@
AutofillDownloadManager::AutofillRequestType request_type,
int http_error);
- // Returns the value of the AutoFillEnabled pref.
- virtual bool IsAutoFillEnabled() const;
+ // Returns the value of the AutofillEnabled pref.
+ virtual bool IsAutofillEnabled() const;
// Imports the form data, submitted by the user, into |personal_data_|.
void ImportFormData(const FormStructure& submitted_form);
@@ -103,16 +103,16 @@
private:
void OnFormSubmitted(const webkit_glue::FormData& form);
void OnFormsSeen(const std::vector<webkit_glue::FormData>& forms);
- void OnQueryFormFieldAutoFill(int query_id,
+ void OnQueryFormFieldAutofill(int query_id,
const webkit_glue::FormData& form,
const webkit_glue::FormField& field);
- void OnFillAutoFillFormData(int query_id,
+ void OnFillAutofillFormData(int query_id,
const webkit_glue::FormData& form,
const webkit_glue::FormField& field,
int unique_id);
- void OnShowAutoFillDialog();
- void OnDidFillAutoFillFormData();
- void OnDidShowAutoFillSuggestions();
+ void OnShowAutofillDialog();
+ void OnDidFillAutofillFormData();
+ void OnDidShowAutofillSuggestions();
// Fills |host| with the RenderViewHost for this tab.
// Returns false if Autofill is disabled or if the host is unavailable.
@@ -208,7 +208,7 @@
// The InfoBar that asks for permission to store credit card information.
// Deletes itself when closed.
- AutoFillCCInfoBarDelegate* cc_infobar_;
+ AutofillCCInfoBarDelegate* cc_infobar_;
// The imported credit card that should be saved if the user accepts the
// infobar.
@@ -230,7 +230,7 @@
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillAddressAndCreditCardForm);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillFormWithMultipleSections);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillFormWithMultipleEmails);
- FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillAutoFilledForm);
+ FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillAutofilledForm);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillPhoneNumber);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FormChangesRemoveField);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FormChangesAddField);
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index 6efe22d..6a7a67b 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -48,7 +48,7 @@
std::vector<string16>,
std::vector<string16>,
std::vector<string16>,
- std::vector<int> > AutoFillParam;
+ std::vector<int> > AutofillParam;
class TestPersonalDataManager : public PersonalDataManager {
public:
@@ -410,7 +410,7 @@
test_personal_data_ = personal_manager;
}
- virtual bool IsAutoFillEnabled() const { return autofill_enabled_; }
+ virtual bool IsAutofillEnabled() const { return autofill_enabled_; }
void set_autofill_enabled(bool autofill_enabled) {
autofill_enabled_ = autofill_enabled;
@@ -473,15 +473,15 @@
Profile* profile() { return contents()->profile(); }
- void GetAutoFillSuggestions(int query_id,
+ void GetAutofillSuggestions(int query_id,
const webkit_glue::FormData& form,
const webkit_glue::FormField& field) {
- autofill_manager_->OnQueryFormFieldAutoFill(query_id, form, field);
+ autofill_manager_->OnQueryFormFieldAutofill(query_id, form, field);
}
- void GetAutoFillSuggestions(const webkit_glue::FormData& form,
+ void GetAutofillSuggestions(const webkit_glue::FormData& form,
const webkit_glue::FormField& field) {
- GetAutoFillSuggestions(kDefaultPageID, form, field);
+ GetAutofillSuggestions(kDefaultPageID, form, field);
}
void AutocompleteSuggestionsReturned(const std::vector<string16>& result) {
@@ -497,26 +497,26 @@
autofill_manager_->OnFormSubmitted(form);
}
- void FillAutoFillFormData(int query_id,
+ void FillAutofillFormData(int query_id,
const webkit_glue::FormData& form,
const webkit_glue::FormField& field,
int unique_id) {
- autofill_manager_->OnFillAutoFillFormData(query_id, form, field, unique_id);
+ autofill_manager_->OnFillAutofillFormData(query_id, form, field, unique_id);
}
- bool GetAutoFillSuggestionsMessage(int* page_id,
+ bool GetAutofillSuggestionsMessage(int* page_id,
std::vector<string16>* values,
std::vector<string16>* labels,
std::vector<string16>* icons,
std::vector<int>* unique_ids) {
- const uint32 kMsgID = AutoFillMsg_SuggestionsReturned::ID;
+ const uint32 kMsgID = AutofillMsg_SuggestionsReturned::ID;
const IPC::Message* message =
process()->sink().GetFirstMessageMatching(kMsgID);
if (!message)
return false;
- AutoFillParam autofill_param;
- AutoFillMsg_SuggestionsReturned::Read(message, &autofill_param);
+ AutofillParam autofill_param;
+ AutofillMsg_SuggestionsReturned::Read(message, &autofill_param);
if (page_id)
*page_id = autofill_param.a;
if (values)
@@ -534,14 +534,14 @@
return true;
}
- bool GetAutoFillFormDataFilledMessage(int *page_id, FormData* results) {
- const uint32 kMsgID = AutoFillMsg_FormDataFilled::ID;
+ bool GetAutofillFormDataFilledMessage(int *page_id, FormData* results) {
+ const uint32 kMsgID = AutofillMsg_FormDataFilled::ID;
const IPC::Message* message =
process()->sink().GetFirstMessageMatching(kMsgID);
if (!message)
return false;
Tuple2<int, FormData> autofill_param;
- AutoFillMsg_FormDataFilled::Read(message, &autofill_param);
+ AutofillMsg_FormDataFilled::Read(message, &autofill_param);
if (page_id)
*page_id = autofill_param.a;
if (results)
@@ -569,7 +569,7 @@
FormsSeen(forms);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -581,7 +581,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- GetAutoFillSuggestionsMessage(
+ GetAutofillSuggestionsMessage(
&page_id, &values, &labels, &icons, &unique_ids);
string16 expected_values[] = {
@@ -613,7 +613,7 @@
FormField field;
autofill_test::CreateTestFormField("First Name", "firstname", "E", "text",
&field);
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -625,7 +625,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {ASCIIToUTF16("Elvis")};
@@ -662,8 +662,8 @@
std::vector<FormData> forms(1, form);
FormsSeen(forms);
- GetAutoFillSuggestions(form, field);
- EXPECT_FALSE(GetAutoFillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
+ GetAutofillSuggestions(form, field);
+ EXPECT_FALSE(GetAutofillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
}
// Test that we cull duplicate profile suggestions.
@@ -682,7 +682,7 @@
autofill_manager_->AddProfile(duplicate_profile);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -694,7 +694,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -720,12 +720,12 @@
std::vector<FormData> forms(1, form);
FormsSeen(forms);
- // Disable AutoFill.
+ // Disable Autofill.
autofill_manager_->set_autofill_enabled(false);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
- EXPECT_FALSE(GetAutoFillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
+ GetAutofillSuggestions(form, field);
+ EXPECT_FALSE(GetAutofillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
}
// Test that we return a warning explaining that autofill suggestions are
@@ -739,7 +739,7 @@
FormsSeen(forms);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -751,7 +751,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -767,14 +767,14 @@
// Now add some Autocomplete suggestions. We should return the autocomplete
// suggestions and the warning; these will be culled by the renderer.
const int kPageID2 = 2;
- GetAutoFillSuggestions(kPageID2, form, field);
+ GetAutofillSuggestions(kPageID2, form, field);
std::vector<string16> suggestions;
suggestions.push_back(ASCIIToUTF16("Jay"));
suggestions.push_back(ASCIIToUTF16("Jason"));
AutocompleteSuggestionsReturned(suggestions);
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values2[] = {
@@ -791,8 +791,8 @@
// Now clear the test profiles and try again -- we shouldn't return a warning.
test_personal_data_->ClearAutofillProfiles();
- GetAutoFillSuggestions(form, field);
- EXPECT_FALSE(GetAutoFillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
+ GetAutofillSuggestions(form, field);
+ EXPECT_FALSE(GetAutofillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
}
// Test that we return all credit card profile suggestions when all form fields
@@ -805,7 +805,7 @@
FormsSeen(forms);
FormField field = form.fields[1];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -817,7 +817,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -850,7 +850,7 @@
FormField field;
autofill_test::CreateTestFormField(
"Card Number", "cardnumber", "4", "text", &field);
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -862,7 +862,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {ASCIIToUTF16("************3456")};
@@ -884,7 +884,7 @@
FormsSeen(forms);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -896,7 +896,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -927,7 +927,7 @@
FormsSeen(forms);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -939,7 +939,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -955,14 +955,14 @@
// Now add some Autocomplete suggestions. We should show the autocomplete
// suggestions and the warning.
const int kPageID2 = 2;
- GetAutoFillSuggestions(kPageID2, form, field);
+ GetAutofillSuggestions(kPageID2, form, field);
std::vector<string16> suggestions;
suggestions.push_back(ASCIIToUTF16("Jay"));
suggestions.push_back(ASCIIToUTF16("Jason"));
AutocompleteSuggestionsReturned(suggestions);
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values2[] = {
l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION),
@@ -978,8 +978,8 @@
// Clear the test credit cards and try again -- we shouldn't return a warning.
test_personal_data_->ClearCreditCards();
- GetAutoFillSuggestions(form, field);
- EXPECT_FALSE(GetAutoFillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
+ GetAutofillSuggestions(form, field);
+ EXPECT_FALSE(GetAutofillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
}
// Test that we return profile and credit card suggestions for combined forms.
@@ -992,7 +992,7 @@
FormsSeen(forms);
FormField field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -1004,7 +1004,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -1024,7 +1024,7 @@
const int kPageID2 = 2;
autofill_test::CreateTestFormField(
"Card Number", "cardnumber", "", "text", &field);
- GetAutoFillSuggestions(kPageID2, form, field);
+ GetAutofillSuggestions(kPageID2, form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -1032,7 +1032,7 @@
// Test that we sent the credit card suggestions to the renderer.
page_id = 0;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values2[] = {
@@ -1066,7 +1066,7 @@
FormsSeen(forms);
FormField field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -1078,7 +1078,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -1098,14 +1098,14 @@
autofill_test::CreateTestFormField(
"Card Number", "cardnumber", "", "text", &field);
const int kPageID2 = 2;
- GetAutoFillSuggestions(kPageID2, form, field);
+ GetAutofillSuggestions(kPageID2, form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
AutocompleteSuggestionsReturned(std::vector<string16>());
// Test that we sent the right message to the renderer.
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values2[] = {
@@ -1120,12 +1120,12 @@
// Clear the test credit cards and try again -- we shouldn't return a warning.
test_personal_data_->ClearCreditCards();
- GetAutoFillSuggestions(form, field);
- EXPECT_FALSE(GetAutoFillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
+ GetAutofillSuggestions(form, field);
+ EXPECT_FALSE(GetAutofillSuggestionsMessage(NULL, NULL, NULL, NULL, NULL));
}
// Test that we correctly combine autofill and autocomplete suggestions.
-TEST_F(AutofillManagerTest, GetCombinedAutoFillAndAutocompleteSuggestions) {
+TEST_F(AutofillManagerTest, GetCombinedAutofillAndAutocompleteSuggestions) {
// Set up our form data.
FormData form;
CreateTestAddressFormData(&form);
@@ -1133,7 +1133,7 @@
FormsSeen(forms);
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// Add some Autocomplete suggestions.
// This triggers the combined message send.
@@ -1150,7 +1150,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -1174,7 +1174,7 @@
// Test that we return autocomplete-like suggestions when trying to autofill
// already filled forms.
-TEST_F(AutofillManagerTest, GetFieldSuggestionsWhenFormIsAutoFilled) {
+TEST_F(AutofillManagerTest, GetFieldSuggestionsWhenFormIsAutofilled) {
// Set up our form data.
FormData form;
CreateTestAddressFormData(&form);
@@ -1184,7 +1184,7 @@
// Mark one of the fields as filled.
form.fields[2].is_autofilled = true;
const FormField& field = form.fields[0];
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -1196,7 +1196,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
ASCIIToUTF16("Elvis"),
@@ -1223,7 +1223,7 @@
std::vector<FormData> forms(1, form);
FormsSeen(forms);
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// Add some Autocomplete suggestions.
// This triggers the combined message send.
@@ -1238,7 +1238,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -1271,7 +1271,7 @@
FormField& field = form.fields[0];
field.is_autofilled = true;
- GetAutoFillSuggestions(form, field);
+ GetAutofillSuggestions(form, field);
// No suggestions provided, so send an empty vector as the results.
// This triggers the combined message send.
@@ -1283,7 +1283,7 @@
std::vector<string16> labels;
std::vector<string16> icons;
std::vector<int> unique_ids;
- EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels, &icons,
+ EXPECT_TRUE(GetAutofillSuggestionsMessage(&page_id, &values, &labels, &icons,
&unique_ids));
string16 expected_values[] = {
@@ -1307,13 +1307,13 @@
FormsSeen(forms);
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledAddressFormElvis(page_id, results, kDefaultPageID, false);
}
@@ -1326,13 +1326,13 @@
FormsSeen(forms);
std::string guid = "00000000-0000-0000-0000-000000000004";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(guid, std::string()));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledCreditCardFormElvis(page_id, results, kDefaultPageID, false);
}
@@ -1349,13 +1349,13 @@
FormsSeen(forms);
std::string guid = "00000000-0000-0000-0000-000000000007";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(guid, std::string()));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledCreditCardYearMonthWithYearMonth(page_id, results,
kDefaultPageID, false, "", "");
}
@@ -1374,13 +1374,13 @@
FormsSeen(forms);
std::string guid = "00000000-0000-0000-0000-000000000007";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(guid, std::string()));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledCreditCardYearMonthWithYearMonth(page_id, results,
kDefaultPageID, false, "", "04");
}
@@ -1398,13 +1398,13 @@
FormsSeen(forms);
std::string guid = "00000000-0000-0000-0000-000000000007";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(guid, std::string()));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledCreditCardYearMonthWithYearMonth(page_id, results,
kDefaultPageID, false, "2012", "");
}
@@ -1423,13 +1423,13 @@
FormsSeen(forms);
std::string guid = "00000000-0000-0000-0000-000000000007";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(guid, std::string()));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledCreditCardYearMonthWithYearMonth(page_id, results,
kDefaultPageID, false, "2012", "04");
}
@@ -1445,12 +1445,12 @@
// First fill the address data.
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(kDefaultPageID, form, form.fields[0],
+ FillAutofillFormData(kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Address");
ExpectFilledAddressFormElvis(page_id, results, kDefaultPageID, true);
@@ -1459,12 +1459,12 @@
// Now fill the credit card data.
const int kPageID2 = 2;
guid = "00000000-0000-0000-0000-000000000004";
- FillAutoFillFormData(
+ FillAutofillFormData(
kPageID2, form, form.fields.back(),
autofill_manager_->PackGUIDs(guid, std::string()));
page_id = 0;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Credit card");
ExpectFilledCreditCardFormElvis(page_id, results, kPageID2, true);
@@ -1488,12 +1488,12 @@
// Fill the first section.
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(kDefaultPageID, form, form.fields[0],
+ FillAutofillFormData(kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Address 1");
@@ -1513,11 +1513,11 @@
const int kPageID2 = 2;
guid = "00000000-0000-0000-0000-000000000001";
ASSERT_LT(9U, kAddressFormSize);
- FillAutoFillFormData(kPageID2, form, form.fields[kAddressFormSize + 9],
+ FillAutofillFormData(kPageID2, form, form.fields[kAddressFormSize + 9],
autofill_manager_->PackGUIDs(std::string(), guid));
page_id = 0;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Address 2");
ASSERT_EQ(results.fields.size(), form.fields.size());
@@ -1558,12 +1558,12 @@
// Fill the form.
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(kDefaultPageID, form, form.fields[0],
+ FillAutofillFormData(kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
// The second email address should be filled.
EXPECT_EQ(ASCIIToUTF16("[email protected]"), results.fields.back().value);
@@ -1574,7 +1574,7 @@
}
// Test that we correctly fill a previously auto-filled form.
-TEST_F(AutofillManagerTest, FillAutoFilledForm) {
+TEST_F(AutofillManagerTest, FillAutofilledForm) {
// Set up our form data.
FormData form;
CreateTestAddressFormData(&form);
@@ -1586,13 +1586,13 @@
// First fill the address data.
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Address");
ExpectFilledForm(page_id, results, kDefaultPageID,
@@ -1603,12 +1603,12 @@
// Now fill the credit card data.
const int kPageID2 = 2;
guid = "00000000-0000-0000-0000-000000000004";
- FillAutoFillFormData(
+ FillAutofillFormData(
kPageID2, form, form.fields.back(),
autofill_manager_->PackGUIDs(guid, std::string()));
page_id = 0;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Credit card 1");
ExpectFilledCreditCardFormElvis(page_id, results, kPageID2, true);
@@ -1623,12 +1623,12 @@
}
const int kPageID3 = 3;
- FillAutoFillFormData(
+ FillAutofillFormData(
kPageID3, form, *form.fields.rbegin(),
autofill_manager_->PackGUIDs(guid, std::string()));
page_id = 0;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
{
SCOPED_TRACE("Credit card 2");
ExpectFilledForm(page_id, results, kPageID3,
@@ -1685,12 +1685,12 @@
// The page ID sent to the AutofillManager from the RenderView, used to send
// an IPC message back to the renderer.
int page_id = 100 - i;
- FillAutoFillFormData(
+ FillAutofillFormData(
page_id, form, *form.fields.begin(),
autofill_manager_->PackGUIDs(std::string(), work_profile->guid()));
page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
if (i != 7) {
EXPECT_EQ(ASCIIToUTF16(test_data), results.fields[2].value);
@@ -1723,13 +1723,13 @@
form.fields.erase(form.fields.begin() + 3);
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledAddressFormElvis(page_id, results, kDefaultPageID, false);
}
@@ -1754,13 +1754,13 @@
form.fields.insert(pos, field);
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(
+ FillAutofillFormData(
kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledAddressFormElvis(page_id, results, kDefaultPageID, false);
}
@@ -1774,12 +1774,12 @@
// Fill the form.
std::string guid = "00000000-0000-0000-0000-000000000001";
- FillAutoFillFormData(kDefaultPageID, form, form.fields[0],
+ FillAutofillFormData(kDefaultPageID, form, form.fields[0],
autofill_manager_->PackGUIDs(std::string(), guid));
int page_id = 0;
FormData results;
- EXPECT_TRUE(GetAutoFillFormDataFilledMessage(&page_id, &results));
+ EXPECT_TRUE(GetAutofillFormDataFilledMessage(&page_id, &results));
ExpectFilledAddressFormElvis(page_id, results, kDefaultPageID, false);
// Simulate form submission. We should call into the PDM to try to save the
@@ -1795,19 +1795,19 @@
// Auxiliary profiles is implemented on Mac only. It enables Mac Address
// Book integration.
ASSERT_TRUE(profile()->GetPrefs()->GetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled));
+ prefs::kAutofillAuxiliaryProfilesEnabled));
profile()->GetPrefs()->SetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled, false);
- profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled);
+ prefs::kAutofillAuxiliaryProfilesEnabled, false);
+ profile()->GetPrefs()->ClearPref(prefs::kAutofillAuxiliaryProfilesEnabled);
ASSERT_TRUE(profile()->GetPrefs()->GetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled));
+ prefs::kAutofillAuxiliaryProfilesEnabled));
#else
ASSERT_FALSE(profile()->GetPrefs()->GetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled));
+ prefs::kAutofillAuxiliaryProfilesEnabled));
profile()->GetPrefs()->SetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled, true);
- profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled);
+ prefs::kAutofillAuxiliaryProfilesEnabled, true);
+ profile()->GetPrefs()->ClearPref(prefs::kAutofillAuxiliaryProfilesEnabled);
ASSERT_FALSE(profile()->GetPrefs()->GetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled));
+ prefs::kAutofillAuxiliaryProfilesEnabled));
#endif
}
diff --git a/chrome/browser/autofill/autofill_merge_unittest.cc b/chrome/browser/autofill/autofill_merge_unittest.cc
index 38cb6d85..cbd83d3 100644
--- a/chrome/browser/autofill/autofill_merge_unittest.cc
+++ b/chrome/browser/autofill/autofill_merge_unittest.cc
@@ -102,15 +102,15 @@
} // namespace
-// A data-driven test for verifying merging of AutoFill profiles. Each input is
+// A data-driven test for verifying merging of Autofill profiles. Each input is
// a structured dump of a set of implicitly detected autofill profiles. The
// corresponding output file is a dump of the saved profiles that result from
// importing the input profiles. The output file format is identical to the
// input format.
-class AutoFillMergeTest : public testing::Test, public DataDrivenTest {
+class AutofillMergeTest : public testing::Test, public DataDrivenTest {
protected:
- AutoFillMergeTest();
- virtual ~AutoFillMergeTest();
+ AutofillMergeTest();
+ virtual ~AutofillMergeTest();
// testing::Test:
virtual void SetUp();
@@ -119,29 +119,29 @@
virtual void GenerateResults(const std::string& input,
std::string* output) OVERRIDE;
- // Deserializes a set of AutoFill profiles from |profiles|, imports each
+ // Deserializes a set of Autofill profiles from |profiles|, imports each
// sequentially, and fills |merged_profiles| with the serialized result.
void MergeProfiles(const std::string& profiles, std::string* merged_profiles);
scoped_refptr<PersonalDataManagerMock> personal_data_;
private:
- DISALLOW_COPY_AND_ASSIGN(AutoFillMergeTest);
+ DISALLOW_COPY_AND_ASSIGN(AutofillMergeTest);
};
-AutoFillMergeTest::AutoFillMergeTest() : DataDrivenTest() {
+AutofillMergeTest::AutofillMergeTest() : DataDrivenTest() {
}
-AutoFillMergeTest::~AutoFillMergeTest() {
+AutofillMergeTest::~AutofillMergeTest() {
}
-void AutoFillMergeTest::SetUp() {
+void AutofillMergeTest::SetUp() {
autofill_test::DisableSystemServices(NULL);
personal_data_ = new PersonalDataManagerMock();
}
-void AutoFillMergeTest::GenerateResults(const std::string& input,
+void AutofillMergeTest::GenerateResults(const std::string& input,
std::string* output) {
MergeProfiles(input, output);
@@ -151,7 +151,7 @@
EXPECT_EQ(*output, merged_output);
}
-void AutoFillMergeTest::MergeProfiles(const std::string& profiles,
+void AutofillMergeTest::MergeProfiles(const std::string& profiles,
std::string* merged_profiles) {
// Start with no saved profiles.
personal_data_->Reset();
@@ -216,7 +216,7 @@
*merged_profiles = SerializeProfiles(personal_data_->web_profiles());
}
-TEST_F(AutoFillMergeTest, DataDrivenMergeProfiles) {
+TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) {
RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName),
kFileNamePattern);
}
diff --git a/chrome/browser/autofill/autofill_metrics_unittest.cc b/chrome/browser/autofill/autofill_metrics_unittest.cc
index 0619e59..5f1aa9b 100644
--- a/chrome/browser/autofill/autofill_metrics_unittest.cc
+++ b/chrome/browser/autofill/autofill_metrics_unittest.cc
@@ -128,7 +128,7 @@
}
virtual ~TestAutofillManager() {}
- virtual bool IsAutoFillEnabled() const { return autofill_enabled_; }
+ virtual bool IsAutofillEnabled() const { return autofill_enabled_; }
void set_autofill_enabled(bool autofill_enabled) {
autofill_enabled_ = autofill_enabled;
@@ -166,7 +166,7 @@
field->set_server_type(server_types[i]);
}
- UpdateAutoFillCount();
+ UpdateAutofillCount();
}
virtual std::string server_experiment_id() const OVERRIDE {
@@ -265,7 +265,7 @@
EXPECT_NO_FATAL_FAILURE(autofill_manager_->OnFormSubmitted(form));
}
-// Test that we log the appropriate additional metrics when AutoFill failed.
+// Test that we log the appropriate additional metrics when Autofill failed.
TEST_F(AutofillMetricsTest, QualityMetricsForFailure) {
// Set up our form data.
FormData form;
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index 01b7886..b8f29a1 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -274,7 +274,7 @@
}
int AutofillProfile::Compare(const AutofillProfile& profile) const {
- // The following AutoFill field types are the only types we store in the WebDB
+ // The following Autofill field types are the only types we store in the WebDB
// so far, so we're only concerned with matching these types in the profile.
const AutofillFieldType types[] = { NAME_FIRST,
NAME_MIDDLE,
diff --git a/chrome/browser/autofill/autofill_type.h b/chrome/browser/autofill/autofill_type.h
index 25b33e5..da6c0b1 100644
--- a/chrome/browser/autofill/autofill_type.h
+++ b/chrome/browser/autofill/autofill_type.h
@@ -13,7 +13,7 @@
#include "base/string16.h"
#include "chrome/browser/autofill/field_types.h"
-// The high-level description of AutoFill types, used to categorize form fields
+// The high-level description of Autofill types, used to categorize form fields
// and for associating form fields with form values in the Web Database.
class AutofillType {
public:
diff --git a/chrome/browser/autofill/autofill_xml_parser.cc b/chrome/browser/autofill/autofill_xml_parser.cc
index 86520e9..4dd2f1c4 100644
--- a/chrome/browser/autofill/autofill_xml_parser.cc
+++ b/chrome/browser/autofill/autofill_xml_parser.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -7,24 +7,24 @@
#include "chrome/browser/autofill/autofill_type.h"
#include "third_party/libjingle/overrides/talk/xmllite/qname.h"
-AutoFillXmlParser::AutoFillXmlParser()
+AutofillXmlParser::AutofillXmlParser()
: succeeded_(true) {
}
-void AutoFillXmlParser::CharacterData(
+void AutofillXmlParser::CharacterData(
buzz::XmlParseContext* context, const char* text, int len) {
}
-void AutoFillXmlParser::EndElement(buzz::XmlParseContext* context,
+void AutofillXmlParser::EndElement(buzz::XmlParseContext* context,
const char* name) {
}
-void AutoFillXmlParser::Error(buzz::XmlParseContext* context,
+void AutofillXmlParser::Error(buzz::XmlParseContext* context,
XML_Error error_code) {
succeeded_ = false;
}
-AutoFillQueryXmlParser::AutoFillQueryXmlParser(
+AutofillQueryXmlParser::AutofillQueryXmlParser(
std::vector<AutofillFieldType>* field_types,
UploadRequired* upload_required,
std::string* experiment_id)
@@ -35,7 +35,7 @@
DCHECK(experiment_id_);
}
-void AutoFillQueryXmlParser::StartElement(buzz::XmlParseContext* context,
+void AutofillQueryXmlParser::StartElement(buzz::XmlParseContext* context,
const char* name,
const char** attrs) {
buzz::QName qname = context->ResolveQName(name, false);
@@ -89,7 +89,7 @@
}
}
-int AutoFillQueryXmlParser::GetIntValue(buzz::XmlParseContext* context,
+int AutofillQueryXmlParser::GetIntValue(buzz::XmlParseContext* context,
const char* attribute) {
char* attr_end = NULL;
int value = strtol(attribute, &attr_end, 10);
@@ -100,7 +100,7 @@
return value;
}
-AutoFillUploadXmlParser::AutoFillUploadXmlParser(double* positive_upload_rate,
+AutofillUploadXmlParser::AutofillUploadXmlParser(double* positive_upload_rate,
double* negative_upload_rate)
: succeeded_(false),
positive_upload_rate_(positive_upload_rate),
@@ -109,7 +109,7 @@
DCHECK(negative_upload_rate_);
}
-void AutoFillUploadXmlParser::StartElement(buzz::XmlParseContext* context,
+void AutofillUploadXmlParser::StartElement(buzz::XmlParseContext* context,
const char* name,
const char** attrs) {
buzz::QName qname = context->ResolveQName(name, false);
@@ -129,7 +129,7 @@
}
}
-double AutoFillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context,
+double AutofillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context,
const char* attribute) {
char* attr_end = NULL;
double value = strtod(attribute, &attr_end);
diff --git a/chrome/browser/autofill/autofill_xml_parser.h b/chrome/browser/autofill/autofill_xml_parser.h
index 05d5554..f25e31a9 100644
--- a/chrome/browser/autofill/autofill_xml_parser.h
+++ b/chrome/browser/autofill/autofill_xml_parser.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -16,10 +16,10 @@
#include "third_party/libjingle/source/talk/xmllite/xmlparser.h"
// The base class that contains common functionality between
-// AutoFillQueryXmlParser and AutoFillUploadXmlParser.
-class AutoFillXmlParser : public buzz::XmlParseHandler {
+// AutofillQueryXmlParser and AutofillUploadXmlParser.
+class AutofillXmlParser : public buzz::XmlParseHandler {
public:
- AutoFillXmlParser();
+ AutofillXmlParser();
// Returns true if no parsing errors were encountered.
bool succeeded() const { return succeeded_; }
@@ -46,10 +46,10 @@
// True if parsing succeeded.
bool succeeded_;
- DISALLOW_COPY_AND_ASSIGN(AutoFillXmlParser);
+ DISALLOW_COPY_AND_ASSIGN(AutofillXmlParser);
};
-// The XML parse handler for parsing AutoFill query responses. A typical
+// The XML parse handler for parsing Autofill query responses. A typical
// response looks like:
//
// <autofillqueryresponse experimentid="1">
@@ -62,9 +62,9 @@
// Fields are returned in the same order they were sent to the server.
// autofilltype: The server's guess at what type of field this is. 0 is
// unknown, other types are documented in chrome/browser/autofill/field_types.h.
-class AutoFillQueryXmlParser : public AutoFillXmlParser {
+class AutofillQueryXmlParser : public AutofillXmlParser {
public:
- AutoFillQueryXmlParser(std::vector<AutofillFieldType>* field_types,
+ AutofillQueryXmlParser(std::vector<AutofillFieldType>* field_types,
UploadRequired* upload_required,
std::string* experiment_id);
@@ -85,7 +85,7 @@
// The parsed field types.
std::vector<AutofillFieldType>* field_types_;
- // A flag indicating whether the client should upload AutoFill data when this
+ // A flag indicating whether the client should upload Autofill data when this
// form is submitted.
UploadRequired* upload_required_;
@@ -93,10 +93,10 @@
// For the default server implementation, this is empty.
std::string* experiment_id_;
- DISALLOW_COPY_AND_ASSIGN(AutoFillQueryXmlParser);
+ DISALLOW_COPY_AND_ASSIGN(AutofillQueryXmlParser);
};
-// The XML parser for handling AutoFill upload responses. Typical upload
+// The XML parser for handling Autofill upload responses. Typical upload
// responses look like:
//
// <autofilluploadresponse negativeuploadrate="0.00125" positiveuploadrate="1"/>
@@ -107,9 +107,9 @@
// the form matches what's in the users profile.
// The negative upload rate is typically much lower than the positive upload
// rate.
-class AutoFillUploadXmlParser : public AutoFillXmlParser {
+class AutofillUploadXmlParser : public AutofillXmlParser {
public:
- AutoFillUploadXmlParser(double* positive_upload_rate,
+ AutofillUploadXmlParser(double* positive_upload_rate,
double* negative_upload_rate);
private:
@@ -132,7 +132,7 @@
double* positive_upload_rate_;
double* negative_upload_rate_;
- DISALLOW_COPY_AND_ASSIGN(AutoFillUploadXmlParser);
+ DISALLOW_COPY_AND_ASSIGN(AutofillUploadXmlParser);
};
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_XML_PARSER_H_
diff --git a/chrome/browser/autofill/autofill_xml_parser_unittest.cc b/chrome/browser/autofill/autofill_xml_parser_unittest.cc
index 0732992..51888e2 100644
--- a/chrome/browser/autofill/autofill_xml_parser_unittest.cc
+++ b/chrome/browser/autofill/autofill_xml_parser_unittest.cc
@@ -12,7 +12,7 @@
namespace {
-TEST(AutoFillQueryXmlParserTest, BasicQuery) {
+TEST(AutofillQueryXmlParserTest, BasicQuery) {
// An XML string representing a basic query response.
std::string xml = "<autofillqueryresponse>"
"<field autofilltype=\"0\" />"
@@ -27,7 +27,7 @@
std::string experiment_id;
// Create a parser.
- AutoFillQueryXmlParser parse_handler(&field_types, &upload_required,
+ AutofillQueryXmlParser parse_handler(&field_types, &upload_required,
&experiment_id);
buzz::XmlParser parser(&parse_handler);
parser.Parse(xml.c_str(), xml.length(), true);
@@ -42,7 +42,7 @@
}
// Test parsing the upload required attribute.
-TEST(AutoFillQueryXmlParserTest, TestUploadRequired) {
+TEST(AutofillQueryXmlParserTest, TestUploadRequired) {
std::vector<AutofillFieldType> field_types;
UploadRequired upload_required = USE_UPLOAD_RATES;
std::string experiment_id;
@@ -51,8 +51,8 @@
"<field autofilltype=\"0\" />"
"</autofillqueryresponse>";
- scoped_ptr<AutoFillQueryXmlParser> parse_handler(
- new AutoFillQueryXmlParser(&field_types, &upload_required,
+ scoped_ptr<AutofillQueryXmlParser> parse_handler(
+ new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
scoped_ptr<buzz::XmlParser> parser(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -67,7 +67,7 @@
"<field autofilltype=\"0\" />"
"</autofillqueryresponse>";
- parse_handler.reset(new AutoFillQueryXmlParser(&field_types, &upload_required,
+ parse_handler.reset(new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -82,7 +82,7 @@
"<field autofilltype=\"0\" />"
"</autofillqueryresponse>";
- parse_handler.reset(new AutoFillQueryXmlParser(&field_types, &upload_required,
+ parse_handler.reset(new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -94,7 +94,7 @@
}
// Test parsing the experiment id attribute
-TEST(AutoFillQueryXmlParserTest, ParseExperimentId) {
+TEST(AutofillQueryXmlParserTest, ParseExperimentId) {
std::vector<AutofillFieldType> field_types;
UploadRequired upload_required = USE_UPLOAD_RATES;
std::string experiment_id;
@@ -105,8 +105,8 @@
"<field autofilltype=\"0\" />"
"</autofillqueryresponse>";
- scoped_ptr<AutoFillQueryXmlParser> parse_handler(
- new AutoFillQueryXmlParser(&field_types, &upload_required,
+ scoped_ptr<AutofillQueryXmlParser> parse_handler(
+ new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
scoped_ptr<buzz::XmlParser> parser(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -123,7 +123,7 @@
"<field autofilltype=\"0\" />"
"</autofillqueryresponse>";
- parse_handler.reset(new AutoFillQueryXmlParser(&field_types, &upload_required,
+ parse_handler.reset(new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -142,7 +142,7 @@
"<field autofilltype=\"0\" />"
"</autofillqueryresponse>";
- parse_handler.reset(new AutoFillQueryXmlParser(&field_types, &upload_required,
+ parse_handler.reset(new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -154,18 +154,18 @@
}
// Test badly formed XML queries.
-TEST(AutoFillQueryXmlParserTest, ParseErrors) {
+TEST(AutofillQueryXmlParserTest, ParseErrors) {
std::vector<AutofillFieldType> field_types;
UploadRequired upload_required = USE_UPLOAD_RATES;
std::string experiment_id;
- // Test no AutoFill type.
+ // Test no Autofill type.
std::string xml = "<autofillqueryresponse>"
"<field/>"
"</autofillqueryresponse>";
- scoped_ptr<AutoFillQueryXmlParser> parse_handler(
- new AutoFillQueryXmlParser(&field_types, &upload_required,
+ scoped_ptr<AutofillQueryXmlParser> parse_handler(
+ new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
scoped_ptr<buzz::XmlParser> parser(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -174,12 +174,12 @@
EXPECT_EQ(0U, field_types.size());
EXPECT_EQ(std::string(), experiment_id);
- // Test an incorrect AutoFill type.
+ // Test an incorrect Autofill type.
xml = "<autofillqueryresponse>"
"<field autofilltype=\"307\"/>"
"</autofillqueryresponse>";
- parse_handler.reset(new AutoFillQueryXmlParser(&field_types, &upload_required,
+ parse_handler.reset(new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -190,14 +190,14 @@
EXPECT_EQ(NO_SERVER_DATA, field_types[0]);
EXPECT_EQ(std::string(), experiment_id);
- // Test an incorrect AutoFill type.
+ // Test an incorrect Autofill type.
field_types.clear();
xml = "<autofillqueryresponse>"
"<field autofilltype=\"No Type\"/>"
"</autofillqueryresponse>";
// Parse fails but an entry is still added to field_types.
- parse_handler.reset(new AutoFillQueryXmlParser(&field_types, &upload_required,
+ parse_handler.reset(new AutofillQueryXmlParser(&field_types, &upload_required,
&experiment_id));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
@@ -209,12 +209,12 @@
}
// Test successfull upload response.
-TEST(AutoFillUploadXmlParser, TestSuccessfulResponse) {
+TEST(AutofillUploadXmlParser, TestSuccessfulResponse) {
std::string xml = "<autofilluploadresponse positiveuploadrate=\"0.5\" "
"negativeuploadrate=\"0.3\"/>";
double positive = 0;
double negative = 0;
- AutoFillUploadXmlParser parse_handler(&positive, &negative);
+ AutofillUploadXmlParser parse_handler(&positive, &negative);
buzz::XmlParser parser(&parse_handler);
parser.Parse(xml.c_str(), xml.length(), true);
EXPECT_TRUE(parse_handler.succeeded());
@@ -223,13 +223,13 @@
}
// Test failed upload response.
-TEST(AutoFillUploadXmlParser, TestFailedResponse) {
+TEST(AutofillUploadXmlParser, TestFailedResponse) {
std::string xml = "<autofilluploadresponse positiveuploadrate=\"\" "
"negativeuploadrate=\"0.3\"/>";
double positive = 0;
double negative = 0;
- scoped_ptr<AutoFillUploadXmlParser> parse_handler(
- new AutoFillUploadXmlParser(&positive, &negative));
+ scoped_ptr<AutofillUploadXmlParser> parse_handler(
+ new AutofillUploadXmlParser(&positive, &negative));
scoped_ptr<buzz::XmlParser> parser(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
EXPECT_TRUE(!parse_handler->succeeded());
@@ -239,7 +239,7 @@
xml = "<autofilluploadresponse positiveuploadrate=\"0.5\" "
"negativeuploadrate=\"0.3\"";
- parse_handler.reset(new AutoFillUploadXmlParser(&positive, &negative));
+ parse_handler.reset(new AutofillUploadXmlParser(&positive, &negative));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
EXPECT_TRUE(!parse_handler->succeeded());
@@ -247,7 +247,7 @@
EXPECT_DOUBLE_EQ(0, negative);
xml = "bad data";
- parse_handler.reset(new AutoFillUploadXmlParser(&positive, &negative));
+ parse_handler.reset(new AutofillUploadXmlParser(&positive, &negative));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
EXPECT_TRUE(!parse_handler->succeeded());
@@ -255,7 +255,7 @@
EXPECT_DOUBLE_EQ(0, negative);
xml = "";
- parse_handler.reset(new AutoFillUploadXmlParser(&positive, &negative));
+ parse_handler.reset(new AutofillUploadXmlParser(&positive, &negative));
parser.reset(new buzz::XmlParser(parse_handler.get()));
parser->Parse(xml.c_str(), xml.length(), true);
EXPECT_TRUE(!parse_handler->succeeded());
diff --git a/chrome/browser/autofill/contact_info.cc b/chrome/browser/autofill/contact_info.cc
index 705d778..009cca6 100644
--- a/chrome/browser/autofill/contact_info.cc
+++ b/chrome/browser/autofill/contact_info.cc
@@ -12,14 +12,14 @@
static const string16 kNameSplitChars = ASCIIToUTF16("-'. ");
-static const AutofillFieldType kAutoFillNameInfoTypes[] = {
+static const AutofillFieldType kAutofillNameInfoTypes[] = {
NAME_FIRST,
NAME_MIDDLE,
NAME_LAST
};
-static const size_t kAutoFillNameInfoLength =
- arraysize(kAutoFillNameInfoTypes);
+static const size_t kAutofillNameInfoLength =
+ arraysize(kAutofillNameInfoTypes);
NameInfo::NameInfo() {}
@@ -88,8 +88,8 @@
string16 match;
if (type == UNKNOWN_TYPE) {
- for (size_t i = 0; i < kAutoFillNameInfoLength; i++) {
- if (FindInfoMatchesHelper(kAutoFillNameInfoTypes[i], info, &match))
+ for (size_t i = 0; i < kAutofillNameInfoLength; i++) {
+ if (FindInfoMatchesHelper(kAutofillNameInfoTypes[i], info, &match))
matched_text->push_back(match);
}
} else if (FindInfoMatchesHelper(type, info, &match)) {
diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc
index e32fb132..ed91ae3e 100644
--- a/chrome/browser/autofill/credit_card.cc
+++ b/chrome/browser/autofill/credit_card.cc
@@ -24,7 +24,7 @@
const char* kCreditCardObfuscationString = "************";
-const AutofillFieldType kAutoFillCreditCardTypes[] = {
+const AutofillFieldType kAutofillCreditCardTypes[] = {
CREDIT_CARD_NAME,
CREDIT_CARD_NUMBER,
CREDIT_CARD_TYPE,
@@ -32,7 +32,7 @@
CREDIT_CARD_EXP_4_DIGIT_YEAR,
};
-const int kAutoFillCreditCardLength = arraysize(kAutoFillCreditCardTypes);
+const int kAutofillCreditCardLength = arraysize(kAutofillCreditCardTypes);
std::string GetCreditCardType(const string16& number) {
// Don't check for a specific type if this is not a credit card number.
@@ -207,8 +207,8 @@
break;
case UNKNOWN_TYPE:
- for (int i = 0; i < kAutoFillCreditCardLength; ++i) {
- if (FindInfoMatchesHelper(kAutoFillCreditCardTypes[i], info, &match))
+ for (int i = 0; i < kAutofillCreditCardLength; ++i) {
+ if (FindInfoMatchesHelper(kAutofillCreditCardTypes[i], info, &match))
matched_text->push_back(match);
}
break;
diff --git a/chrome/browser/autofill/field_types.h b/chrome/browser/autofill/field_types.h
index 9d76e8b..011116f 100644
--- a/chrome/browser/autofill/field_types.h
+++ b/chrome/browser/autofill/field_types.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -16,8 +16,8 @@
// NOTE: This list MUST not be modified. The server aggregates and stores these
// types over several versions, so we must remain fully compatible with the
-// AutoFill server, which is itself backward-compatible. The list must be kept
-// up to date with the AutoFill server list.
+// Autofill server, which is itself backward-compatible. The list must be kept
+// up to date with the Autofill server list.
//
// This is the list of all valid field types.
typedef enum _FieldType {
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 3794852..888d3a54 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -24,7 +24,7 @@
// XML elements and attributes.
const char kAttributeAcceptedFeatures[] = "accepts";
-const char kAttributeAutoFillUsed[] = "autofillused";
+const char kAttributeAutofillUsed[] = "autofillused";
const char kAttributeAutofillType[] = "autofilltype";
const char kAttributeClientVersion[] = "clientversion";
const char kAttributeDataPresent[] = "datapresent";
@@ -33,8 +33,8 @@
const char kAcceptedFeatures[] = "e"; // e=experiments
const char kClientVersion[] = "6.1.1715.1442/en (GGLL)";
const char kXMLDeclaration[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
-const char kXMLElementAutoFillQuery[] = "autofillquery";
-const char kXMLElementAutoFillUpload[] = "autofillupload";
+const char kXMLElementAutofillQuery[] = "autofillquery";
+const char kXMLElementAutofillUpload[] = "autofillupload";
const char kXMLElementForm[] = "form";
const char kXMLElementField[] = "field";
@@ -56,7 +56,7 @@
for (field = form.fields.begin();
field != form.fields.end(); field++) {
// Add all supported form fields (including with empty names) to the
- // signature. This is a requirement for AutoFill servers.
+ // signature. This is a requirement for Autofill servers.
form_signature_field_names_.append("&");
form_signature_field_names_.append(UTF16ToUTF8(field->name));
@@ -123,12 +123,12 @@
// Set up the <autofillupload> element and its attributes.
buzz::XmlElement autofill_request_xml(
- (buzz::QName(kXMLElementAutoFillUpload)));
+ (buzz::QName(kXMLElementAutofillUpload)));
autofill_request_xml.SetAttr(buzz::QName(kAttributeClientVersion),
kClientVersion);
autofill_request_xml.SetAttr(buzz::QName(kAttributeFormSignature),
FormSignature());
- autofill_request_xml.SetAttr(buzz::QName(kAttributeAutoFillUsed),
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeAutofillUsed),
auto_fill_used ? "true" : "false");
autofill_request_xml.SetAttr(buzz::QName(kAttributeDataPresent),
ConvertPresenceBitsToString().c_str());
@@ -155,7 +155,7 @@
// Set up the <autofillquery> element and attributes.
buzz::XmlElement autofill_request_xml(
- (buzz::QName(kXMLElementAutoFillQuery)));
+ (buzz::QName(kXMLElementAutofillQuery)));
autofill_request_xml.SetAttr(buzz::QName(kAttributeClientVersion),
kClientVersion);
autofill_request_xml.SetAttr(buzz::QName(kAttributeAcceptedFeatures),
@@ -204,7 +204,7 @@
// Parse the field types from the server response to the query.
std::vector<AutofillFieldType> field_types;
std::string experiment_id;
- AutoFillQueryXmlParser parse_handler(&field_types, upload_required,
+ AutofillQueryXmlParser parse_handler(&field_types, upload_required,
&experiment_id);
buzz::XmlParser parser(&parse_handler);
parser.Parse(response_xml.c_str(), response_xml.length(), true);
@@ -255,7 +255,7 @@
form->has_autofillable_field_ = true;
}
- form->UpdateAutoFillCount();
+ form->UpdateAutofillCount();
}
AutofillMetrics::ServerQueryMetric metric;
@@ -289,14 +289,14 @@
return Hash64Bit(form_string);
}
-bool FormStructure::IsAutoFillable(bool require_method_post) const {
+bool FormStructure::IsAutofillable(bool require_method_post) const {
if (autofill_count() < kRequiredFillableFields)
return false;
return ShouldBeParsed(require_method_post);
}
-void FormStructure::UpdateAutoFillCount() {
+void FormStructure::UpdateAutofillCount() {
autofill_count_ = 0;
for (std::vector<AutofillField*>::const_iterator iter = begin();
iter != end(); ++iter) {
diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h
index 100abd2..517388c 100644
--- a/chrome/browser/autofill/form_structure.h
+++ b/chrome/browser/autofill/form_structure.h
@@ -34,7 +34,7 @@
class AutofillMetrics;
// FormStructure stores a single HTML form together with the values entered
-// in the fields along with additional information needed by AutoFill.
+// in the fields along with additional information needed by Autofill.
class FormStructure {
public:
explicit FormStructure(const webkit_glue::FormData& form);
@@ -70,15 +70,15 @@
// Runs a quick heuristic to rule out forms that are obviously not
// auto-fillable, like google/yahoo/msn search, etc. The requirement that the
// form's method be POST is only applied if |require_method_post| is true.
- bool IsAutoFillable(bool require_method_post) const;
+ bool IsAutofillable(bool require_method_post) const;
// Resets |autofill_count_| and counts the number of auto-fillable fields.
// This is used when we receive server data for form fields. At that time,
// we may have more known fields than just the number of fields we matched
// heuristically.
- void UpdateAutoFillCount();
+ void UpdateAutofillCount();
- // Returns true if this form matches the structural requirements for AutoFill.
+ // Returns true if this form matches the structural requirements for Autofill.
// The requirement that the form's method be POST is only applied if
// |require_method_post| is true.
bool ShouldBeParsed(bool require_method_post) const;
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc
index 8fb100b..5b939883 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -28,7 +28,7 @@
} // namespace
-// A data-driven test for verifying AutoFill heuristics. Each input is an HTML
+// A data-driven test for verifying Autofill heuristics. Each input is an HTML
// file that contains one or more forms. The corresponding output file lists the
// heuristically detected type for eachfield.
class FormStructureBrowserTest : public InProcessBrowserTest,
diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
index 558ac2d5..bd2e26ee 100644
--- a/chrome/browser/autofill/form_structure_unittest.cc
+++ b/chrome/browser/autofill/form_structure_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -75,7 +75,7 @@
EXPECT_EQ(3U, form_structure.field_count());
}
-TEST(FormStructureTest, AutoFillCount) {
+TEST(FormStructureTest, AutofillCount) {
FormData form;
form.method = ASCIIToUTF16("post");
form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("username"),
@@ -118,7 +118,7 @@
EXPECT_EQ(form.origin, form_structure.source_url());
}
-TEST(FormStructureTest, IsAutoFillable) {
+TEST(FormStructureTest, IsAutofillable) {
scoped_ptr<FormStructure> form_structure;
FormData form;
@@ -144,7 +144,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
+ EXPECT_FALSE(form_structure->IsAutofillable(true));
// We now have three text fields, but only two auto-fillable fields.
form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("First Name"),
@@ -161,7 +161,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
+ EXPECT_FALSE(form_structure->IsAutofillable(true));
// We now have three auto-fillable fields.
form.fields.push_back(webkit_glue::FormField(ASCIIToUTF16("Email"),
@@ -172,28 +172,28 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
// The method must be 'post', though we can intentionally ignore this
// criterion for the sake of providing a helpful warning message to the user.
form.method = ASCIIToUTF16("get");
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
- EXPECT_TRUE(form_structure->IsAutoFillable(false));
+ EXPECT_FALSE(form_structure->IsAutofillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(false));
// The target cannot include http(s)://*/search...
form.method = ASCIIToUTF16("post");
form.action = GURL("http://google.com/search?q=hello");
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_FALSE(form_structure->IsAutoFillable(true));
+ EXPECT_FALSE(form_structure->IsAutofillable(true));
// But search can be in the URL.
form.action = GURL("http://search.com/?q=hello");
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
}
TEST(FormStructureTest, HeuristicsContactInfo) {
@@ -257,7 +257,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
// Expect the correct number of fields.
ASSERT_EQ(9U, form_structure->field_count());
@@ -361,7 +361,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(10U, form_structure->field_count());
ASSERT_EQ(9U, form_structure->autofill_count());
@@ -447,7 +447,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(7U, form_structure->field_count());
ASSERT_EQ(6U, form_structure->autofill_count());
@@ -531,7 +531,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(9U, form_structure->field_count());
ASSERT_EQ(8U, form_structure->autofill_count());
@@ -599,7 +599,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(6U, form_structure->field_count());
ASSERT_EQ(4U, form_structure->autofill_count());
@@ -669,7 +669,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(7U, form_structure->field_count());
ASSERT_EQ(4U, form_structure->autofill_count());
@@ -725,7 +725,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -776,7 +776,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(4U, form_structure->autofill_count());
@@ -831,7 +831,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -876,7 +876,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(3U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -916,7 +916,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(3U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -1013,7 +1013,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(11U, form_structure->field_count());
ASSERT_EQ(11U, form_structure->autofill_count());
@@ -1069,7 +1069,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
ASSERT_EQ(3U, form_structure->autofill_count());
@@ -1121,7 +1121,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
// Expect the correct number of fields.
ASSERT_EQ(5U, form_structure->field_count());
@@ -1182,7 +1182,7 @@
false));
form_structure.reset(new FormStructure(form));
form_structure->DetermineHeuristicTypes();
- EXPECT_TRUE(form_structure->IsAutoFillable(true));
+ EXPECT_TRUE(form_structure->IsAutofillable(true));
// Expect the correct number of fields.
ASSERT_EQ(6U, form_structure->field_count());
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 0f26238..6f04182 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -28,7 +28,7 @@
namespace {
// The minimum number of fields that must contain user data and have known types
-// before AutoFill will attempt to import the data into a profile or a credit
+// before Autofill will attempt to import the data into a profile or a credit
// card.
const int kMinProfileImportSize = 3;
const int kMinCreditCardImportSize = 2;
@@ -600,7 +600,7 @@
const std::vector<AutofillProfile*>& PersonalDataManager::profiles() {
// |profile_| is NULL in AutofillManagerTest.
bool auxiliary_profiles_enabled = profile_ ? profile_->GetPrefs()->GetBoolean(
- prefs::kAutoFillAuxiliaryProfilesEnabled) : false;
+ prefs::kAutofillAuxiliaryProfilesEnabled) : false;
if (!auxiliary_profiles_enabled)
return web_profiles();
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index b82be51..3df559a 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -25,9 +25,9 @@
class FormStructure;
class Profile;
-// Handles loading and saving AutoFill profile information to the web database.
+// Handles loading and saving Autofill profile information to the web database.
// This class also stores the profiles loaded from the database for use during
-// AutoFill.
+// Autofill.
class PersonalDataManager
: public WebDataServiceConsumer,
public ProfileSyncServiceObserver,
@@ -64,7 +64,7 @@
virtual void OnStateChanged();
// TODO(isherman): Update this comment
- // If AutoFill is able to determine the field types of a significant number of
+ // If Autofill is able to determine the field types of a significant number of
// field types that contain information in the FormStructures a profile will
// be created with all of the information from recognized fields. Returns
// whether a profile was created.
@@ -79,7 +79,7 @@
//
// The relationship between this and Refresh is subtle.
// A call to |SetProfiles| could include out-of-date data that may conflict
- // if we didn't refresh-to-latest before an AutoFill window was opened for
+ // if we didn't refresh-to-latest before an Autofill window was opened for
// editing. |SetProfiles| is implemented to make a "best effort" to apply the
// changes, but in extremely rare edge cases it is possible not all of the
// updates in |profiles| make it to the DB. This is why SetProfiles will
@@ -164,7 +164,7 @@
// Make sure that only Profile and certain tests can create an instance of
// PersonalDataManager.
friend class base::RefCountedThreadSafe<PersonalDataManager>;
- friend class AutoFillMergeTest;
+ friend class AutofillMergeTest;
friend class PersonalDataManagerTest;
friend class ProfileImpl;
friend class ProfileSyncServiceAutofillTest;
diff --git a/chrome/browser/autofill/personal_data_manager_unittest.cc b/chrome/browser/autofill/personal_data_manager_unittest.cc
index 9b3469d..3136c39 100644
--- a/chrome/browser/autofill/personal_data_manager_unittest.cc
+++ b/chrome/browser/autofill/personal_data_manager_unittest.cc
@@ -23,10 +23,10 @@
#include "content/common/notification_registrar.h"
#include "content/common/notification_source.h"
#include "content/common/notification_type.h"
-#include "webkit/glue/form_data.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/form_data.h"
+#include "webkit/glue/form_data.h"
using webkit_glue::FormData;
@@ -495,7 +495,7 @@
wds->RemoveAutofillProfile(profile2.guid());
// Before telling the PDM to refresh, simulate an edit to one of the profiles
- // via a SetProfile update (this would happen if the AutoFill window was
+ // via a SetProfile update (this would happen if the Autofill window was
// open with a previous snapshot of the profiles, and something [e.g. sync]
// removed a profile from the browser. In this edge case, we will end up
// in a consistent state by dropping the write).
diff --git a/chrome/browser/autofill/phone_number.cc b/chrome/browser/autofill/phone_number.cc
index 43634d8..b06e253 100644
--- a/chrome/browser/autofill/phone_number.cc
+++ b/chrome/browser/autofill/phone_number.cc
@@ -20,7 +20,7 @@
// The number of digits in an area code.
const size_t kPhoneCityCodeLength = 3;
-const AutofillType::FieldTypeSubGroup kAutoFillPhoneTypes[] = {
+const AutofillType::FieldTypeSubGroup kAutofillPhoneTypes[] = {
AutofillType::PHONE_NUMBER,
AutofillType::PHONE_CITY_CODE,
AutofillType::PHONE_COUNTRY_CODE,
@@ -28,7 +28,7 @@
AutofillType::PHONE_WHOLE_NUMBER,
};
-const int kAutoFillPhoneLength = arraysize(kAutoFillPhoneTypes);
+const int kAutofillPhoneLength = arraysize(kAutofillPhoneTypes);
} // namespace
@@ -126,8 +126,8 @@
string16 match;
if (type == UNKNOWN_TYPE) {
- for (int i = 0; i < kAutoFillPhoneLength; ++i) {
- if (FindInfoMatchesHelper(kAutoFillPhoneTypes[i], info, &match))
+ for (int i = 0; i < kAutofillPhoneLength; ++i) {
+ if (FindInfoMatchesHelper(kAutofillPhoneTypes[i], info, &match))
matched_text->push_back(match);
}
} else {