diff options
24 files changed, 200 insertions, 200 deletions
diff --git a/chrome/browser/autocomplete_history_manager.h b/chrome/browser/autocomplete_history_manager.h index 8ccd52b..4f8b8f3 100644 --- a/chrome/browser/autocomplete_history_manager.h +++ b/chrome/browser/autocomplete_history_manager.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. @@ -34,7 +34,7 @@ class AutocompleteHistoryManager : public TabContentsObserver, virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, const WDTypedResult* result); - // Pass-through functions that are called by AutoFillManager, after it has + // Pass-through functions that are called by AutofillManager, after it has // dispatched a message. void OnGetAutocompleteSuggestions( int query_id, @@ -48,7 +48,7 @@ class AutocompleteHistoryManager : public TabContentsObserver, protected: friend class AutocompleteHistoryManagerTest; - friend class AutoFillManagerTest; + friend class AutofillManagerTest; // For tests. AutocompleteHistoryManager(TabContents* tab_contents, diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc index 2a204c4..b038088 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc @@ -13,7 +13,7 @@ #include "ui/base/resource/resource_bundle.h" AutoFillCCInfoBarDelegate::AutoFillCCInfoBarDelegate(TabContents* tab_contents, - AutoFillManager* host) + AutofillManager* host) : ConfirmInfoBarDelegate(tab_contents), host_(host) { } diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h index 1f9ee67..24e6f47 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.h +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h @@ -9,13 +9,13 @@ #include "base/string16.h" #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" -class AutoFillManager; +class AutofillManager; // An InfoBar delegate that enables the user to allow or deny storing credit // card information gathered from a form submission. class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate { public: - AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutoFillManager* host); + AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutofillManager* host); private: virtual ~AutoFillCCInfoBarDelegate(); @@ -33,8 +33,8 @@ class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate { virtual string16 GetLinkText(); virtual bool LinkClicked(WindowOpenDisposition disposition); - // The AutoFillManager that initiated this InfoBar. - AutoFillManager* host_; + // The AutofillManager that initiated this InfoBar. + AutofillManager* host_; DISALLOW_COPY_AND_ASSIGN(AutoFillCCInfoBarDelegate); }; diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index af1d5b1..0933d4e 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -210,7 +210,7 @@ bool FormIsHTTPS(FormStructure* form) { } // namespace -AutoFillManager::AutoFillManager(TabContents* tab_contents) +AutofillManager::AutofillManager(TabContents* tab_contents) : TabContentsObserver(tab_contents), personal_data_(NULL), download_manager_(tab_contents->profile()), @@ -225,17 +225,17 @@ AutoFillManager::AutoFillManager(TabContents* tab_contents) download_manager_.SetObserver(this); } -AutoFillManager::~AutoFillManager() { +AutofillManager::~AutofillManager() { download_manager_.SetObserver(NULL); } // static -void AutoFillManager::RegisterBrowserPrefs(PrefService* prefs) { +void AutofillManager::RegisterBrowserPrefs(PrefService* prefs) { prefs->RegisterDictionaryPref(prefs::kAutoFillDialogPlacement); } // static -void AutoFillManager::RegisterUserPrefs(PrefService* prefs) { +void AutofillManager::RegisterUserPrefs(PrefService* prefs) { prefs->RegisterBooleanPref(prefs::kAutoFillEnabled, true); #if defined(OS_MACOSX) prefs->RegisterBooleanPref(prefs::kAutoFillAuxiliaryProfilesEnabled, true); @@ -248,15 +248,15 @@ void AutoFillManager::RegisterUserPrefs(PrefService* prefs) { kAutoFillNegativeUploadRateDefaultValue); } -void AutoFillManager::DidNavigateMainFramePostCommit( +void AutofillManager::DidNavigateMainFramePostCommit( const NavigationController::LoadCommittedDetails& details, const ViewHostMsg_FrameNavigate_Params& params) { Reset(); } -bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { +bool AutofillManager::OnMessageReceived(const IPC::Message& message) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(AutoFillManager, message) + IPC_BEGIN_MESSAGE_MAP(AutofillManager, message) IPC_MESSAGE_HANDLER(AutoFillHostMsg_FormsSeen, OnFormsSeen) IPC_MESSAGE_HANDLER(AutoFillHostMsg_FormSubmitted, OnFormSubmitted) IPC_MESSAGE_HANDLER(AutoFillHostMsg_QueryFormFieldAutoFill, @@ -275,7 +275,7 @@ bool AutoFillManager::OnMessageReceived(const IPC::Message& message) { return handled; } -void AutoFillManager::OnFormSubmitted(const FormData& form) { +void AutofillManager::OnFormSubmitted(const FormData& form) { // Let AutoComplete know as well. tab_contents()->autocomplete_history_manager()->OnFormSubmitted(form); @@ -307,14 +307,14 @@ void AutoFillManager::OnFormSubmitted(const FormData& form) { ImportFormData(submitted_form); } -void AutoFillManager::OnFormsSeen(const std::vector<FormData>& forms) { +void AutofillManager::OnFormsSeen(const std::vector<FormData>& forms) { if (!IsAutoFillEnabled()) return; ParseForms(forms); } -void AutoFillManager::OnQueryFormFieldAutoFill( +void AutofillManager::OnQueryFormFieldAutoFill( int query_id, const webkit_glue::FormData& form, const webkit_glue::FormField& field) { @@ -385,7 +385,7 @@ void AutoFillManager::OnQueryFormFieldAutoFill( 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) { @@ -471,8 +471,8 @@ void AutoFillManager::OnFillAutoFillFormData(int query_id, // directly and we can fill these corresponding fields; however, when the // |form_structure| and |result.fields| do not match directly we search // ahead in the |form_structure| for the matching field. - // See unit tests: AutoFillManagerTest.FormChangesRemoveField and - // AutoFillManagerTest.FormChangesAddField for usage. + // See unit tests: AutofillManagerTest.FormChangesRemoveField and + // AutofillManagerTest.FormChangesAddField for usage. for (size_t i = section_start, j = 0; i < section_end && j < result.fields.size(); j++) { @@ -509,7 +509,7 @@ void AutoFillManager::OnFillAutoFillFormData(int query_id, host->routing_id(), query_id, result)); } -void AutoFillManager::OnShowAutoFillDialog() { +void AutofillManager::OnShowAutoFillDialog() { if (!CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableTabbedOptions)) { Browser* browser = BrowserList::GetLastActive(); @@ -523,23 +523,23 @@ void AutoFillManager::OnShowAutoFillDialog() { tab_contents()->profile()->GetOriginalProfile()); } -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()), NotificationService::NoDetails()); } -void AutoFillManager::OnLoadedAutofillHeuristics( +void AutofillManager::OnLoadedAutofillHeuristics( const std::string& heuristic_xml) { - // TODO(jhawkins): Store |upload_required| in the AutoFillManager. + // TODO(jhawkins): Store |upload_required| in the AutofillManager. UploadRequired upload_required; FormStructure::ParseQueryResponse(heuristic_xml, form_structures_.get(), @@ -547,19 +547,19 @@ void AutoFillManager::OnLoadedAutofillHeuristics( *metric_logger_); } -void AutoFillManager::OnUploadedAutofillHeuristics( +void AutofillManager::OnUploadedAutofillHeuristics( const std::string& form_signature) { } -void AutoFillManager::OnHeuristicsRequestError( +void AutofillManager::OnHeuristicsRequestError( const std::string& form_signature, AutofillDownloadManager::AutofillRequestType request_type, int http_error) { } -bool AutoFillManager::IsAutoFillEnabled() const { +bool AutofillManager::IsAutoFillEnabled() const { PrefService* prefs = - const_cast<AutoFillManager*>(this)->tab_contents()->profile()->GetPrefs(); + const_cast<AutofillManager*>(this)->tab_contents()->profile()->GetPrefs(); // Migrate obsolete AutoFill pref. if (prefs->FindPreference(prefs::kFormAutofillEnabled)) { @@ -572,7 +572,7 @@ bool AutoFillManager::IsAutoFillEnabled() const { return prefs->GetBoolean(prefs::kAutoFillEnabled); } -void AutoFillManager::DeterminePossibleFieldTypesForUpload( +void AutofillManager::DeterminePossibleFieldTypesForUpload( FormStructure* submitted_form) { for (size_t i = 0; i < submitted_form->field_count(); i++) { const AutofillField* field = submitted_form->field(i); @@ -584,7 +584,7 @@ void AutoFillManager::DeterminePossibleFieldTypesForUpload( } } -void AutoFillManager::LogMetricsAboutSubmittedForm( +void AutofillManager::LogMetricsAboutSubmittedForm( const FormData& form, const FormStructure* submitted_form) { FormStructure* cached_submitted_form; @@ -666,7 +666,7 @@ void AutoFillManager::LogMetricsAboutSubmittedForm( } } -void AutoFillManager::ImportFormData(const FormStructure& submitted_form) { +void AutofillManager::ImportFormData(const FormStructure& submitted_form) { std::vector<const FormStructure*> import; import.push_back(&submitted_form); @@ -683,7 +683,7 @@ void AutoFillManager::ImportFormData(const FormStructure& submitted_form) { } } -void AutoFillManager::UploadFormData(const FormStructure& submitted_form) { +void AutofillManager::UploadFormData(const FormStructure& submitted_form) { if (!disable_download_manager_requests_) { bool was_autofilled = false; // Check if the form among last 3 forms that were auto-filled. @@ -705,16 +705,16 @@ void AutoFillManager::UploadFormData(const FormStructure& submitted_form) { } } -void AutoFillManager::Reset() { +void AutofillManager::Reset() { form_structures_.reset(); } -void AutoFillManager::OnInfoBarClosed(bool should_save) { +void AutofillManager::OnInfoBarClosed(bool should_save) { if (should_save) personal_data_->SaveImportedCreditCard(*imported_credit_card_); } -AutoFillManager::AutoFillManager(TabContents* tab_contents, +AutofillManager::AutofillManager(TabContents* tab_contents, PersonalDataManager* personal_data) : TabContentsObserver(tab_contents), personal_data_(personal_data), @@ -725,12 +725,12 @@ AutoFillManager::AutoFillManager(TabContents* tab_contents, DCHECK(tab_contents); } -void AutoFillManager::set_metric_logger( +void AutofillManager::set_metric_logger( const AutofillMetrics* metric_logger) { metric_logger_.reset(metric_logger); } -bool AutoFillManager::GetHost(const std::vector<AutoFillProfile*>& profiles, +bool AutofillManager::GetHost(const std::vector<AutoFillProfile*>& profiles, const std::vector<CreditCard*>& credit_cards, RenderViewHost** host) { if (!IsAutoFillEnabled()) @@ -747,7 +747,7 @@ bool AutoFillManager::GetHost(const std::vector<AutoFillProfile*>& profiles, return true; } -bool AutoFillManager::FindCachedForm(const FormData& form, +bool AutofillManager::FindCachedForm(const FormData& form, FormStructure** form_structure) { // Find the FormStructure that corresponds to |form|. *form_structure = NULL; @@ -766,7 +766,7 @@ bool AutoFillManager::FindCachedForm(const FormData& form, return true; } -bool AutoFillManager::FindCachedFormAndField(const FormData& form, +bool AutofillManager::FindCachedFormAndField(const FormData& form, const FormField& field, FormStructure** form_structure, AutofillField** autofill_field) { @@ -800,7 +800,7 @@ bool AutoFillManager::FindCachedFormAndField(const FormData& form, return true; } -void AutoFillManager::GetProfileSuggestions(FormStructure* form, +void AutofillManager::GetProfileSuggestions(FormStructure* form, const FormField& field, AutoFillType type, std::vector<string16>* values, @@ -842,7 +842,7 @@ void AutoFillManager::GetProfileSuggestions(FormStructure* form, icons->resize(values->size()); } -void AutoFillManager::GetCreditCardSuggestions(FormStructure* form, +void AutofillManager::GetCreditCardSuggestions(FormStructure* form, const FormField& field, AutoFillType type, std::vector<string16>* values, @@ -869,7 +869,7 @@ void AutoFillManager::GetCreditCardSuggestions(FormStructure* form, } } -void AutoFillManager::FillCreditCardFormField(const CreditCard* credit_card, +void AutofillManager::FillCreditCardFormField(const CreditCard* credit_card, AutoFillType type, webkit_glue::FormField* field) { DCHECK(credit_card); @@ -894,7 +894,7 @@ void AutoFillManager::FillCreditCardFormField(const CreditCard* credit_card, } } -void AutoFillManager::FillFormField(const AutoFillProfile* profile, +void AutofillManager::FillFormField(const AutoFillProfile* profile, AutoFillType type, webkit_glue::FormField* field) { DCHECK(profile); @@ -911,7 +911,7 @@ void AutoFillManager::FillFormField(const AutoFillProfile* profile, } } -void AutoFillManager::FillPhoneNumberField(const AutoFillProfile* profile, +void AutofillManager::FillPhoneNumberField(const AutoFillProfile* profile, AutoFillType type, webkit_glue::FormField* field) { // If we are filling a phone number, check to see if the size field @@ -935,7 +935,7 @@ void AutoFillManager::FillPhoneNumberField(const AutoFillProfile* profile, } } -void AutoFillManager::ParseForms(const std::vector<FormData>& forms) { +void AutofillManager::ParseForms(const std::vector<FormData>& forms) { std::vector<FormStructure*> non_queryable_forms; for (std::vector<FormData>::const_iterator iter = forms.begin(); iter != forms.end(); ++iter) { @@ -965,7 +965,7 @@ void AutoFillManager::ParseForms(const std::vector<FormData>& forms) { // When sending IDs (across processes) to the renderer we pack credit card and // profile IDs into a single integer. Credit card IDs are sent in the high // word and profile IDs are sent in the low word. -int AutoFillManager::PackGUIDs(const std::string& cc_guid, +int AutofillManager::PackGUIDs(const std::string& cc_guid, const std::string& profile_guid) { int cc_id = GUIDToID(cc_guid); int profile_id = GUIDToID(profile_guid); @@ -979,7 +979,7 @@ int AutoFillManager::PackGUIDs(const std::string& cc_guid, // When receiving IDs (across processes) from the renderer we unpack credit card // and profile IDs from a single integer. Credit card IDs are stored in the // high word and profile IDs are stored in the low word. -void AutoFillManager::UnpackGUIDs(int id, +void AutofillManager::UnpackGUIDs(int id, std::string* cc_guid, std::string* profile_guid) { int cc_id = id >> std::numeric_limits<unsigned short>::digits & @@ -990,7 +990,7 @@ void AutoFillManager::UnpackGUIDs(int id, *profile_guid = IDToGUID(profile_id); } -int AutoFillManager::GUIDToID(const std::string& guid) { +int AutofillManager::GUIDToID(const std::string& guid) { static int last_id = 1; if (!guid::IsValidGUID(guid)) @@ -1006,7 +1006,7 @@ int AutoFillManager::GUIDToID(const std::string& guid) { } } -const std::string AutoFillManager::IDToGUID(int id) { +const std::string AutofillManager::IDToGUID(int id) { if (id == 0) return std::string(); diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h index 15537ae..3659c45 100644 --- a/chrome/browser/autofill/autofill_manager.h +++ b/chrome/browser/autofill/autofill_manager.h @@ -33,11 +33,11 @@ class FormField; // Manages saving and restoring the user's personal information entered into web // forms. -class AutoFillManager : public TabContentsObserver, +class AutofillManager : public TabContentsObserver, public AutofillDownloadManager::Observer { public: - explicit AutoFillManager(TabContents* tab_contents); - virtual ~AutoFillManager(); + explicit AutofillManager(TabContents* tab_contents); + virtual ~AutofillManager(); // Registers our browser prefs. static void RegisterBrowserPrefs(PrefService* prefs); @@ -77,7 +77,7 @@ class AutoFillManager : public TabContentsObserver, protected: // For tests. - AutoFillManager(TabContents* tab_contents, + AutofillManager(TabContents* tab_contents, PersonalDataManager* personal_data); void set_personal_data_manager(PersonalDataManager* personal_data) { @@ -184,7 +184,7 @@ class AutoFillManager : public TabContentsObserver, const FormStructure* submitted_form); // The personal data manager, used to save and load personal data to/from the - // web database. This is overridden by the AutoFillManagerTest. + // web database. This is overridden by the AutofillManagerTest. // Weak reference. // May be NULL. NULL indicates OTR. PersonalDataManager* personal_data_; @@ -193,7 +193,7 @@ class AutoFillManager : public TabContentsObserver, // Handles queries and uploads to Autofill servers. AutofillDownloadManager download_manager_; - // Should be set to true in AutoFillManagerTest and other tests, false in + // Should be set to true in AutofillManagerTest and other tests, false in // AutofillDownloadManagerTest and in non-test environment. Is false by // default for the public constructor, and true by default for the test-only // constructors. @@ -217,21 +217,21 @@ class AutoFillManager : public TabContentsObserver, std::map<std::string, int> guid_id_map_; std::map<int, std::string> id_guid_map_; - friend class AutoFillManagerTest; + friend class AutofillManagerTest; friend class FormStructureBrowserTest; - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillCreditCardForm); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillCreditCardFormNoYearNoMonth); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardFormYearNoMonth); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardFormNoYearMonth); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardFormYearMonth); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressForm); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAddressAndCreditCardForm); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillFormWithMultipleSections); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillAutoFilledForm); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillPhoneNumber); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesRemoveField); - FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FormChangesAddField); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillCreditCardFormYearNoMonth); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillCreditCardFormNoYearMonth); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillCreditCardFormYearMonth); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillAddressForm); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillAddressAndCreditCardForm); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillFormWithMultipleSections); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillAutoFilledForm); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillPhoneNumber); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FormChangesRemoveField); + FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FormChangesAddField); FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetrics); FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, NoQualityMetricsForNonAutofillableForms); @@ -239,7 +239,7 @@ class AutoFillManager : public TabContentsObserver, FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsForFailure); FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, QualityMetricsWithExperimentId); - DISALLOW_COPY_AND_ASSIGN(AutoFillManager); + DISALLOW_COPY_AND_ASSIGN(AutofillManager); }; #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc index 8d18c04..9a97b76 100644 --- a/chrome/browser/autofill/autofill_manager_unittest.cc +++ b/chrome/browser/autofill/autofill_manager_unittest.cc @@ -7,8 +7,8 @@ #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/scoped_vector.h" -#include "base/string_number_conversions.h" #include "base/string16.h" +#include "base/string_number_conversions.h" #include "base/stringprintf.h" #include "base/tuple.h" #include "base/utf_string_conversions.h" @@ -39,7 +39,7 @@ using webkit_glue::FormField; namespace { -// The page ID sent to the AutoFillManager from the RenderView, used to send +// The page ID sent to the AutofillManager from the RenderView, used to send // an IPC message back to the renderer. const int kDefaultPageID = 137; @@ -402,11 +402,11 @@ void ExpectFilledCreditCardYearMonthWithYearMonth(int page_id, has_address_fields, true, true); } -class TestAutoFillManager : public AutoFillManager { +class TestAutofillManager : public AutofillManager { public: - TestAutoFillManager(TabContents* tab_contents, + TestAutofillManager(TabContents* tab_contents, TestPersonalDataManager* personal_manager) - : AutoFillManager(tab_contents, personal_manager), + : AutofillManager(tab_contents, personal_manager), autofill_enabled_(true) { test_personal_data_ = personal_manager; } @@ -450,16 +450,16 @@ class TestAutoFillManager : public AutoFillManager { TestPersonalDataManager* test_personal_data_; bool autofill_enabled_; - DISALLOW_COPY_AND_ASSIGN(TestAutoFillManager); + DISALLOW_COPY_AND_ASSIGN(TestAutofillManager); }; } // namespace -class AutoFillManagerTest : public RenderViewHostTestHarness { +class AutofillManagerTest : public RenderViewHostTestHarness { public: - AutoFillManagerTest() {} - virtual ~AutoFillManagerTest() { - // Order of destruction is important as AutoFillManager relies on + AutofillManagerTest() {} + virtual ~AutofillManagerTest() { + // Order of destruction is important as AutofillManager relies on // PersonalDataManager to be around when it gets destroyed. autofill_manager_.reset(NULL); test_personal_data_ = NULL; @@ -468,7 +468,7 @@ class AutoFillManagerTest : public RenderViewHostTestHarness { virtual void SetUp() { RenderViewHostTestHarness::SetUp(); test_personal_data_ = new TestPersonalDataManager(); - autofill_manager_.reset(new TestAutoFillManager(contents(), + autofill_manager_.reset(new TestAutofillManager(contents(), test_personal_data_.get())); } @@ -549,16 +549,16 @@ class AutoFillManagerTest : public RenderViewHostTestHarness { } protected: - scoped_ptr<TestAutoFillManager> autofill_manager_; + scoped_ptr<TestAutofillManager> autofill_manager_; scoped_refptr<TestPersonalDataManager> test_personal_data_; private: - DISALLOW_COPY_AND_ASSIGN(AutoFillManagerTest); + DISALLOW_COPY_AND_ASSIGN(AutofillManagerTest); }; // Test that we return all address profile suggestions when all form fields are // empty. -TEST_F(AutoFillManagerTest, GetProfileSuggestionsEmptyValue) { +TEST_F(AutofillManagerTest, GetProfileSuggestionsEmptyValue) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -600,7 +600,7 @@ TEST_F(AutoFillManagerTest, GetProfileSuggestionsEmptyValue) { // Test that we return only matching address profile suggestions when the // selected form field has been partially filled out. -TEST_F(AutoFillManagerTest, GetProfileSuggestionsMatchCharacter) { +TEST_F(AutofillManagerTest, GetProfileSuggestionsMatchCharacter) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -635,7 +635,7 @@ TEST_F(AutoFillManagerTest, GetProfileSuggestionsMatchCharacter) { } // Test that we return no suggestions when the form has no relevant fields. -TEST_F(AutoFillManagerTest, GetProfileSuggestionsUnknownFields) { +TEST_F(AutofillManagerTest, GetProfileSuggestionsUnknownFields) { // Set up our form data. FormData form; form.name = ASCIIToUTF16("MyForm"); @@ -664,7 +664,7 @@ TEST_F(AutoFillManagerTest, GetProfileSuggestionsUnknownFields) { } // Test that we cull duplicate profile suggestions. -TEST_F(AutoFillManagerTest, GetProfileSuggestionsWithDuplicates) { +TEST_F(AutofillManagerTest, GetProfileSuggestionsWithDuplicates) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -709,7 +709,7 @@ TEST_F(AutoFillManagerTest, GetProfileSuggestionsWithDuplicates) { } // Test that we return no suggestions when autofill is disabled. -TEST_F(AutoFillManagerTest, GetProfileSuggestionsAutofillDisabledByUser) { +TEST_F(AutofillManagerTest, GetProfileSuggestionsAutofillDisabledByUser) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -726,7 +726,7 @@ TEST_F(AutoFillManagerTest, GetProfileSuggestionsAutofillDisabledByUser) { // Test that we return a warning explaining that autofill suggestions are // unavailable when the form method is GET rather than POST. -TEST_F(AutoFillManagerTest, GetProfileSuggestionsMethodGet) { +TEST_F(AutofillManagerTest, GetProfileSuggestionsMethodGet) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -793,7 +793,7 @@ TEST_F(AutoFillManagerTest, GetProfileSuggestionsMethodGet) { // Test that we return all credit card profile suggestions when all form fields // are empty. -TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsEmptyValue) { +TEST_F(AutofillManagerTest, GetCreditCardSuggestionsEmptyValue) { // Set up our form data. FormData form; CreateTestCreditCardFormData(&form, true, false); @@ -836,7 +836,7 @@ TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsEmptyValue) { // Test that we return only matching credit card profile suggestions when the // selected form field has been partially filled out. -TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsMatchCharacter) { +TEST_F(AutofillManagerTest, GetCreditCardSuggestionsMatchCharacter) { // Set up our form data. FormData form; CreateTestCreditCardFormData(&form, true, false); @@ -872,7 +872,7 @@ TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsMatchCharacter) { // Test that we return credit card profile suggestions when the selected form // field is not the credit card number field. -TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsNonCCNumber) { +TEST_F(AutofillManagerTest, GetCreditCardSuggestionsNonCCNumber) { // Set up our form data. FormData form; CreateTestCreditCardFormData(&form, true, false); @@ -915,7 +915,7 @@ TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsNonCCNumber) { // Test that we return a warning explaining that credit card profile suggestions // are unavailable when the form is not https. -TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsNonHTTPS) { +TEST_F(AutofillManagerTest, GetCreditCardSuggestionsNonHTTPS) { // Set up our form data. FormData form; CreateTestCreditCardFormData(&form, false, false); @@ -979,7 +979,7 @@ TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsNonHTTPS) { } // Test that we return profile and credit card suggestions for combined forms. -TEST_F(AutoFillManagerTest, GetAddressAndCreditCardSuggestions) { +TEST_F(AutofillManagerTest, GetAddressAndCreditCardSuggestions) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1053,7 +1053,7 @@ TEST_F(AutoFillManagerTest, GetAddressAndCreditCardSuggestions) { // only return address suggestions. Instead of credit card suggestions, we // should return a warning explaining that credit card profile suggestions are // unavailable when the form is not https. -TEST_F(AutoFillManagerTest, GetAddressAndCreditCardSuggestionsNonHttps) { +TEST_F(AutofillManagerTest, GetAddressAndCreditCardSuggestionsNonHttps) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1121,7 +1121,7 @@ TEST_F(AutoFillManagerTest, GetAddressAndCreditCardSuggestionsNonHttps) { } // 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); @@ -1170,7 +1170,7 @@ TEST_F(AutoFillManagerTest, GetCombinedAutoFillAndAutocompleteSuggestions) { // 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); @@ -1208,7 +1208,7 @@ TEST_F(AutoFillManagerTest, GetFieldSuggestionsWhenFormIsAutoFilled) { // Test that nothing breaks when there are autocomplete suggestions but no // autofill suggestions. -TEST_F(AutoFillManagerTest, GetFieldSuggestionsForAutocompleteOnly) { +TEST_F(AutofillManagerTest, GetFieldSuggestionsForAutocompleteOnly) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1251,7 +1251,7 @@ TEST_F(AutoFillManagerTest, GetFieldSuggestionsForAutocompleteOnly) { // Test that we do not return duplicate values drawn from multiple profiles when // filling an already filled field. -TEST_F(AutoFillManagerTest, GetFieldSuggestionsWithDuplicateValues) { +TEST_F(AutofillManagerTest, GetFieldSuggestionsWithDuplicateValues) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1295,7 +1295,7 @@ TEST_F(AutoFillManagerTest, GetFieldSuggestionsWithDuplicateValues) { } // Test that we correctly fill an address form. -TEST_F(AutoFillManagerTest, FillAddressForm) { +TEST_F(AutofillManagerTest, FillAddressForm) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1314,7 +1314,7 @@ TEST_F(AutoFillManagerTest, FillAddressForm) { } // Test that we correctly fill a credit card form. -TEST_F(AutoFillManagerTest, FillCreditCardForm) { +TEST_F(AutofillManagerTest, FillCreditCardForm) { // Set up our form data. FormData form; CreateTestCreditCardFormData(&form, true, false); @@ -1334,7 +1334,7 @@ TEST_F(AutoFillManagerTest, FillCreditCardForm) { // Test that we correctly fill a credit card form with month input type. // 1. year empty, month empty -TEST_F(AutoFillManagerTest, FillCreditCardFormNoYearNoMonth) { +TEST_F(AutofillManagerTest, FillCreditCardFormNoYearNoMonth) { // Same as the SetUp(), but generate 4 credit cards with year month // combination. test_personal_data_->CreateTestCreditCardsYearAndMonth("", ""); @@ -1359,7 +1359,7 @@ TEST_F(AutoFillManagerTest, FillCreditCardFormNoYearNoMonth) { // Test that we correctly fill a credit card form with month input type. // 2. year empty, month non-empty -TEST_F(AutoFillManagerTest, FillCreditCardFormNoYearMonth) { +TEST_F(AutofillManagerTest, FillCreditCardFormNoYearMonth) { // Same as the SetUp(), but generate 4 credit cards with year month // combination. test_personal_data_->CreateTestCreditCardsYearAndMonth("", "04"); @@ -1383,7 +1383,7 @@ TEST_F(AutoFillManagerTest, FillCreditCardFormNoYearMonth) { // Test that we correctly fill a credit card form with month input type. // 3. year non-empty, month empty -TEST_F(AutoFillManagerTest, FillCreditCardFormYearNoMonth) { +TEST_F(AutofillManagerTest, FillCreditCardFormYearNoMonth) { // Same as the SetUp(), but generate 4 credit cards with year month // combination. test_personal_data_->CreateTestCreditCardsYearAndMonth("2012", ""); @@ -1407,7 +1407,7 @@ TEST_F(AutoFillManagerTest, FillCreditCardFormYearNoMonth) { // Test that we correctly fill a credit card form with month input type. // 4. year non-empty, month empty -TEST_F(AutoFillManagerTest, FillCreditCardFormYearMonth) { +TEST_F(AutofillManagerTest, FillCreditCardFormYearMonth) { // Same as the SetUp(), but generate 4 credit cards with year month // combination. test_personal_data_->ClearCreditCards(); @@ -1431,7 +1431,7 @@ TEST_F(AutoFillManagerTest, FillCreditCardFormYearMonth) { } // Test that we correctly fill a combined address and credit card form. -TEST_F(AutoFillManagerTest, FillAddressAndCreditCardForm) { +TEST_F(AutofillManagerTest, FillAddressAndCreditCardForm) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1469,7 +1469,7 @@ TEST_F(AutoFillManagerTest, FillAddressAndCreditCardForm) { // Test that we correctly fill a form that has multiple logical sections, e.g. // both a billing and a shipping address. -TEST_F(AutoFillManagerTest, FillFormWithMultipleSections) { +TEST_F(AutofillManagerTest, FillFormWithMultipleSections) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1539,7 +1539,7 @@ TEST_F(AutoFillManagerTest, FillFormWithMultipleSections) { } // 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); @@ -1603,7 +1603,7 @@ TEST_F(AutoFillManagerTest, FillAutoFilledForm) { } // Test that we correctly fill a phone number split across multiple fields. -TEST_F(AutoFillManagerTest, FillPhoneNumber) { +TEST_F(AutofillManagerTest, FillPhoneNumber) { // Set up our form data. FormData form; form.name = ASCIIToUTF16("MyPhoneForm"); @@ -1648,7 +1648,7 @@ TEST_F(AutoFillManagerTest, FillPhoneNumber) { test_data[i] = 0; SCOPED_TRACE(StringPrintf("Testing phone: %s", test_data)); work_profile->SetInfo(phone_type, ASCIIToUTF16(test_data)); - // The page ID sent to the AutoFillManager from the RenderView, used to send + // 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( @@ -1672,7 +1672,7 @@ TEST_F(AutoFillManagerTest, FillPhoneNumber) { } // Test that we can still fill a form when a field has been removed from it. -TEST_F(AutoFillManagerTest, FormChangesRemoveField) { +TEST_F(AutofillManagerTest, FormChangesRemoveField) { // Set up our form data. FormData form; CreateTestAddressFormData(&form); @@ -1700,7 +1700,7 @@ TEST_F(AutoFillManagerTest, FormChangesRemoveField) { } // Test that we can still fill a form when a field has been added to it. -TEST_F(AutoFillManagerTest, FormChangesAddField) { +TEST_F(AutofillManagerTest, FormChangesAddField) { // The offset of the fax field in the address form. const int kFaxFieldOffset = 10; @@ -1732,7 +1732,7 @@ TEST_F(AutoFillManagerTest, FormChangesAddField) { // Checks that resetting the auxiliary profile enabled preference does the right // thing on all platforms. -TEST_F(AutoFillManagerTest, AuxiliaryProfilesReset) { +TEST_F(AutofillManagerTest, AuxiliaryProfilesReset) { #if defined(OS_MACOSX) // Auxiliary profiles is implemented on Mac only. It enables Mac Address // Book integration. diff --git a/chrome/browser/autofill/autofill_metrics_unittest.cc b/chrome/browser/autofill/autofill_metrics_unittest.cc index e43886ad..ce12e4f 100644 --- a/chrome/browser/autofill/autofill_metrics_unittest.cc +++ b/chrome/browser/autofill/autofill_metrics_unittest.cc @@ -122,11 +122,11 @@ class TestPersonalDataManager : public PersonalDataManager { DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); }; -class TestAutofillManager : public AutoFillManager { +class TestAutofillManager : public AutofillManager { public: TestAutofillManager(TabContents* tab_contents, TestPersonalDataManager* personal_manager) - : AutoFillManager(tab_contents, personal_manager), + : AutofillManager(tab_contents, personal_manager), autofill_enabled_(true) { set_metric_logger(new MockAutofillMetrics); } @@ -140,7 +140,7 @@ class TestAutofillManager : public AutoFillManager { const MockAutofillMetrics* metric_logger() const { return static_cast<const MockAutofillMetrics*>( - AutoFillManager::metric_logger()); + AutofillManager::metric_logger()); } void AddSeenForm(FormStructure* form) { @@ -191,7 +191,7 @@ class AutofillMetricsTest : public RenderViewHostTestHarness { public: AutofillMetricsTest() {} virtual ~AutofillMetricsTest() { - // Order of destruction is important as AutoFillManager relies on + // Order of destruction is important as AutofillManager relies on // PersonalDataManager to be around when it gets destroyed. autofill_manager_.reset(NULL); test_personal_data_ = NULL; diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc index 9f06b99..02e91a0 100644 --- a/chrome/browser/autofill/form_structure_browsertest.cc +++ b/chrome/browser/autofill/form_structure_browsertest.cc @@ -59,9 +59,9 @@ void FormStructureBrowserTest::GenerateResults(const std::string& input, ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), HTMLToDataURI(input))); - AutoFillManager* autofill_manager = + AutofillManager* autofill_manager = browser()->GetSelectedTabContents()->autofill_manager(); - ASSERT_NE(static_cast<AutoFillManager*>(NULL), autofill_manager); + ASSERT_NE(static_cast<AutofillManager*>(NULL), autofill_manager); std::vector<FormStructure*> forms = autofill_manager->form_structures_.get(); *output = FormStructureBrowserTest::FormStructuresToString(forms); } diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc index 579edd8..8b7410b 100644 --- a/chrome/browser/autofill/personal_data_manager.cc +++ b/chrome/browser/autofill/personal_data_manager.cc @@ -575,7 +575,7 @@ bool PersonalDataManager::IsDataLoaded() const { } const std::vector<AutoFillProfile*>& PersonalDataManager::profiles() { - // |profile_| is NULL in AutoFillManagerTest. + // |profile_| is NULL in AutofillManagerTest. bool auxiliary_profiles_enabled = profile_ ? profile_->GetPrefs()->GetBoolean( prefs::kAutoFillAuxiliaryProfilesEnabled) : false; if (!auxiliary_profiles_enabled) diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h index c7c5c30..e7bfee6 100644 --- a/chrome/browser/autofill/personal_data_manager.h +++ b/chrome/browser/autofill/personal_data_manager.h @@ -20,7 +20,7 @@ #include "chrome/browser/autofill/field_types.h" #include "chrome/browser/webdata/web_data_service.h" -class AutoFillManager; +class AutofillManager; class AutofillMetrics; class FormStructure; class Profile; diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 3f4c134..b48945b 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -98,7 +98,7 @@ void RegisterLocalState(PrefService* local_state) { UpgradeDetector::RegisterPrefs(local_state); TaskManager::RegisterPrefs(local_state); geolocation::RegisterPrefs(local_state); - AutoFillManager::RegisterBrowserPrefs(local_state); + AutofillManager::RegisterBrowserPrefs(local_state); BackgroundPageTracker::RegisterPrefs(local_state); NotificationUIManager::RegisterPrefs(local_state); PrefProxyConfigService::RegisterPrefs(local_state); @@ -116,7 +116,7 @@ void RegisterLocalState(PrefService* local_state) { void RegisterUserPrefs(PrefService* user_prefs) { // User prefs - AutoFillManager::RegisterUserPrefs(user_prefs); + AutofillManager::RegisterUserPrefs(user_prefs); SessionStartupPref::RegisterUserPrefs(user_prefs); Browser::RegisterUserPrefs(user_prefs); PasswordManager::RegisterUserPrefs(user_prefs); diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index 5c15069..ab0ac22 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -518,7 +518,7 @@ void TranslateManager::DoTranslatePage(TabContents* tab, // Ideally we'd have a better way to uniquely identify form control elements, // but we don't have that yet. So before start translation, we clear the - // current form and re-parse it in AutoFillManager first to get the new + // current form and re-parse it in AutofillManager first to get the new // labels. tab->autofill_manager()->Reset(); } diff --git a/chrome/common/autofill_messages.h b/chrome/common/autofill_messages.h index 4e2f9bc..dd1776f 100644 --- a/chrome/common/autofill_messages.h +++ b/chrome/common/autofill_messages.h @@ -75,7 +75,7 @@ IPC_MESSAGE_ROUTED1(AutoFillMsg_FillPasswordForm, // AutoFill messages sent from the renderer to the browser. // Notification that forms have been seen that are candidates for -// filling/submitting by the AutoFillManager. +// filling/submitting by the AutofillManager. IPC_MESSAGE_ROUTED1(AutoFillHostMsg_FormsSeen, std::vector<webkit_glue::FormData> /* forms */) diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc index e4085de..da8e2c3 100644 --- a/chrome/renderer/autofill/autofill_agent.cc +++ b/chrome/renderer/autofill/autofill_agent.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. @@ -42,7 +42,7 @@ namespace autofill { AutoFillAgent::AutoFillAgent( RenderView* render_view, - PasswordAutoFillManager* password_autofill_manager) + PasswordAutofillManager* password_autofill_manager) : RenderViewObserver(render_view), password_autofill_manager_(password_autofill_manager), autofill_query_id_(0), diff --git a/chrome/renderer/autofill/autofill_agent.h b/chrome/renderer/autofill/autofill_agent.h index cdf760c..298a800 100644 --- a/chrome/renderer/autofill/autofill_agent.h +++ b/chrome/renderer/autofill/autofill_agent.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. @@ -19,7 +19,7 @@ namespace autofill { -class PasswordAutoFillManager; +class PasswordAutofillManager; // AutoFillAgent deals with AutoFill related communications between WebKit and // the browser. There is one AutoFillAgent per RenderView. @@ -33,9 +33,9 @@ class AutoFillAgent : public RenderViewObserver, public PageClickListener, public WebKit::WebAutoFillClient { public: - // PasswordAutoFillManager is guaranteed to outlive AutoFillAgent. + // PasswordAutofillManager is guaranteed to outlive AutoFillAgent. AutoFillAgent(RenderView* render_view, - PasswordAutoFillManager* password_autofill_manager); + PasswordAutofillManager* password_autofill_manager); virtual ~AutoFillAgent(); // WebKit::WebAutoFillClient implementation. Public for tests. @@ -108,10 +108,10 @@ class AutoFillAgent : public RenderViewObserver, void QueryAutoFillSuggestions(const WebKit::WebNode& node, bool display_warning_if_disabled); - // Queries the AutoFillManager for form data for the form containing |node|. + // Queries the AutofillManager for form data for the form containing |node|. // |value| is the current text in the field, and |unique_id| is the selected // profile's unique ID. |action| specifies whether to Fill or Preview the - // values returned from the AutoFillManager. + // values returned from the AutofillManager. void FillAutoFillFormData(const WebKit::WebNode& node, int unique_id, AutoFillAction action); @@ -128,7 +128,7 @@ class AutoFillAgent : public RenderViewObserver, FormManager form_manager_; - PasswordAutoFillManager* password_autofill_manager_; + PasswordAutofillManager* password_autofill_manager_; // The ID of the last request sent for form field AutoFill. Used to ignore // out of date responses. @@ -137,7 +137,7 @@ class AutoFillAgent : public RenderViewObserver, // The node corresponding to the last request sent for form field AutoFill. WebKit::WebNode autofill_query_node_; - // The action to take when receiving AutoFill data from the AutoFillManager. + // The action to take when receiving AutoFill data from the AutofillManager. AutoFillAction autofill_action_; // Should we display a warning if autofill is disabled? diff --git a/chrome/renderer/autofill/password_autofill_manager.cc b/chrome/renderer/autofill/password_autofill_manager.cc index 1fee8dad..7b397fb 100644 --- a/chrome/renderer/autofill/password_autofill_manager.cc +++ b/chrome/renderer/autofill/password_autofill_manager.cc @@ -195,18 +195,18 @@ bool DoUsernamesMatch(const string16& username1, namespace autofill { //////////////////////////////////////////////////////////////////////////////// -// PasswordAutoFillManager, public: +// PasswordAutofillManager, public: -PasswordAutoFillManager::PasswordAutoFillManager( +PasswordAutofillManager::PasswordAutofillManager( RenderView* render_view) : RenderViewObserver(render_view), ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { } -PasswordAutoFillManager::~PasswordAutoFillManager() { +PasswordAutofillManager::~PasswordAutofillManager() { } -bool PasswordAutoFillManager::TextFieldDidEndEditing( +bool PasswordAutofillManager::TextFieldDidEndEditing( const WebKit::WebInputElement& element) { LoginToPasswordInfoMap::const_iterator iter = login_to_password_info_.find(element); @@ -232,7 +232,7 @@ bool PasswordAutoFillManager::TextFieldDidEndEditing( return true; } -bool PasswordAutoFillManager::TextDidChangeInTextField( +bool PasswordAutofillManager::TextDidChangeInTextField( const WebKit::WebInputElement& element) { LoginToPasswordInfoMap::const_iterator iter = login_to_password_info_.find(element); @@ -279,12 +279,12 @@ bool PasswordAutoFillManager::TextDidChangeInTextField( // properly at this point (http://bugs.webkit.org/show_bug.cgi?id=16976) and // we need it to determine whether or not to trigger autocomplete. MessageLoop::current()->PostTask(FROM_HERE, method_factory_.NewRunnableMethod( - &PasswordAutoFillManager::PerformInlineAutocomplete, + &PasswordAutofillManager::PerformInlineAutocomplete, element, password, iter->second.fill_data)); return true; } -bool PasswordAutoFillManager::TextFieldHandlingKeyDown( +bool PasswordAutofillManager::TextFieldHandlingKeyDown( const WebKit::WebInputElement& element, const WebKit::WebKeyboardEvent& event) { LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(element); @@ -297,7 +297,7 @@ bool PasswordAutoFillManager::TextFieldHandlingKeyDown( return true; } -bool PasswordAutoFillManager::DidAcceptAutoFillSuggestion( +bool PasswordAutofillManager::DidAcceptAutoFillSuggestion( const WebKit::WebNode& node, const WebKit::WebString& value) { WebKit::WebInputElement input; @@ -312,14 +312,14 @@ bool PasswordAutoFillManager::DidAcceptAutoFillSuggestion( password.fill_data, true, true); } -bool PasswordAutoFillManager::DidSelectAutoFillSuggestion( +bool PasswordAutofillManager::DidSelectAutoFillSuggestion( const WebKit::WebNode& node) { WebKit::WebInputElement input; PasswordInfo password; return FindLoginInfo(node, &input, &password); } -void PasswordAutoFillManager::SendPasswordForms(WebKit::WebFrame* frame, +void PasswordAutofillManager::SendPasswordForms(WebKit::WebFrame* frame, bool only_visible) { // Make sure that this security origin is allowed to use password manager. WebKit::WebSecurityOrigin security_origin = frame->securityOrigin(); @@ -355,28 +355,28 @@ void PasswordAutoFillManager::SendPasswordForms(WebKit::WebFrame* frame, } } -bool PasswordAutoFillManager::OnMessageReceived(const IPC::Message& message) { +bool PasswordAutofillManager::OnMessageReceived(const IPC::Message& message) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(PasswordAutoFillManager, message) + IPC_BEGIN_MESSAGE_MAP(PasswordAutofillManager, message) IPC_MESSAGE_HANDLER(AutoFillMsg_FillPasswordForm, OnFillPasswordForm) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; } -void PasswordAutoFillManager::DidFinishDocumentLoad(WebKit::WebFrame* frame) { +void PasswordAutofillManager::DidFinishDocumentLoad(WebKit::WebFrame* frame) { SendPasswordForms(frame, false); } -void PasswordAutoFillManager::DidFinishLoad(WebKit::WebFrame* frame) { +void PasswordAutofillManager::DidFinishLoad(WebKit::WebFrame* frame) { SendPasswordForms(frame, true); } -void PasswordAutoFillManager::FrameDetached(WebKit::WebFrame* frame) { +void PasswordAutofillManager::FrameDetached(WebKit::WebFrame* frame) { FrameClosing(frame); } -void PasswordAutoFillManager::FrameWillClose(WebKit::WebFrame* frame) { +void PasswordAutofillManager::FrameWillClose(WebKit::WebFrame* frame) { FrameClosing(frame); } @@ -384,7 +384,7 @@ void PasswordAutoFillManager::FrameWillClose(WebKit::WebFrame* frame) { //////////////////////////////////////////////////////////////////////////////// // PageClickListener implementation: -bool PasswordAutoFillManager::InputElementClicked( +bool PasswordAutofillManager::InputElementClicked( const WebKit::WebInputElement& element, bool was_focused, bool is_focused) { @@ -392,7 +392,7 @@ bool PasswordAutoFillManager::InputElementClicked( return false; } -void PasswordAutoFillManager::OnFillPasswordForm( +void PasswordAutofillManager::OnFillPasswordForm( const webkit_glue::PasswordFormFillData& form_data) { FormElementsList forms; // We own the FormElements* in forms. @@ -426,9 +426,9 @@ void PasswordAutoFillManager::OnFillPasswordForm( } //////////////////////////////////////////////////////////////////////////////// -// PasswordAutoFillManager, private: +// PasswordAutofillManager, private: -void PasswordAutoFillManager::GetSuggestions( +void PasswordAutofillManager::GetSuggestions( const webkit_glue::PasswordFormFillData& fill_data, const string16& input, std::vector<string16>* suggestions) { @@ -443,7 +443,7 @@ void PasswordAutoFillManager::GetSuggestions( } } -bool PasswordAutoFillManager::ShowSuggestionPopup( +bool PasswordAutofillManager::ShowSuggestionPopup( const webkit_glue::PasswordFormFillData& fill_data, const WebKit::WebInputElement& user_input) { WebKit::WebView* webview = user_input.document().frame()->view(); @@ -465,7 +465,7 @@ bool PasswordAutoFillManager::ShowSuggestionPopup( return true; } -bool PasswordAutoFillManager::FillUserNameAndPassword( +bool PasswordAutofillManager::FillUserNameAndPassword( WebKit::WebInputElement* username_element, WebKit::WebInputElement* password_element, const webkit_glue::PasswordFormFillData& fill_data, @@ -512,7 +512,7 @@ bool PasswordAutoFillManager::FillUserNameAndPassword( return true; } -void PasswordAutoFillManager::PerformInlineAutocomplete( +void PasswordAutofillManager::PerformInlineAutocomplete( const WebKit::WebInputElement& username_input, const WebKit::WebInputElement& password_input, const webkit_glue::PasswordFormFillData& fill_data) { @@ -536,7 +536,7 @@ void PasswordAutoFillManager::PerformInlineAutocomplete( FillUserNameAndPassword(&username, &password, fill_data, false, true); } -void PasswordAutoFillManager::FrameClosing(const WebKit::WebFrame* frame) { +void PasswordAutofillManager::FrameClosing(const WebKit::WebFrame* frame) { for (LoginToPasswordInfoMap::iterator iter = login_to_password_info_.begin(); iter != login_to_password_info_.end();) { if (iter->first.document().frame() == frame) @@ -546,7 +546,7 @@ void PasswordAutoFillManager::FrameClosing(const WebKit::WebFrame* frame) { } } -bool PasswordAutoFillManager::FindLoginInfo( +bool PasswordAutofillManager::FindLoginInfo( const WebKit::WebNode& node, WebKit::WebInputElement* found_input, PasswordInfo* found_password) { diff --git a/chrome/renderer/autofill/password_autofill_manager.h b/chrome/renderer/autofill/password_autofill_manager.h index 0ed409b..15bad82 100644 --- a/chrome/renderer/autofill/password_autofill_manager.h +++ b/chrome/renderer/autofill/password_autofill_manager.h @@ -12,8 +12,8 @@ #include "base/task.h" #include "chrome/renderer/page_click_listener.h" #include "chrome/renderer/render_view_observer.h" -#include "webkit/glue/password_form_dom_manager.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" +#include "webkit/glue/password_form_dom_manager.h" namespace WebKit { class WebInputElement; @@ -23,12 +23,12 @@ class WebKeyboardEvent; namespace autofill { // This class is responsible for filling password forms. -// There is one PasswordAutoFillManager per RenderView. -class PasswordAutoFillManager : public RenderViewObserver, +// There is one PasswordAutofillManager per RenderView. +class PasswordAutofillManager : public RenderViewObserver, public PageClickListener { public: - explicit PasswordAutoFillManager(RenderView* render_view); - virtual ~PasswordAutoFillManager(); + explicit PasswordAutofillManager(RenderView* render_view); + virtual ~PasswordAutofillManager(); // WebViewClient editor related calls forwarded by the RenderView. // If they return true, it indicates the event was consumed and should not @@ -47,7 +47,7 @@ class PasswordAutoFillManager : public RenderViewObserver, bool DidSelectAutoFillSuggestion(const WebKit::WebNode& node); private: - friend class PasswordAutoFillManagerTest; + friend class PasswordAutofillManagerTest; struct PasswordInfo { WebKit::WebInputElement password_field; @@ -109,9 +109,9 @@ class PasswordAutoFillManager : public RenderViewObserver, // The logins we have filled so far with their associated info. LoginToPasswordInfoMap login_to_password_info_; - ScopedRunnableMethodFactory<PasswordAutoFillManager> method_factory_; + ScopedRunnableMethodFactory<PasswordAutofillManager> method_factory_; - DISALLOW_COPY_AND_ASSIGN(PasswordAutoFillManager); + DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); }; } // namespace autofill diff --git a/chrome/renderer/autofill/password_autofill_manager_unittest.cc b/chrome/renderer/autofill/password_autofill_manager_unittest.cc index 6da502e..b11f16c 100644 --- a/chrome/renderer/autofill/password_autofill_manager_unittest.cc +++ b/chrome/renderer/autofill/password_autofill_manager_unittest.cc @@ -55,9 +55,9 @@ const char* const kFormHTML = namespace autofill { -class PasswordAutoFillManagerTest : public RenderViewTest { +class PasswordAutofillManagerTest : public RenderViewTest { public: - PasswordAutoFillManagerTest() { + PasswordAutofillManagerTest() { } // Simulates the fill password form message being sent to the renderer. @@ -163,16 +163,16 @@ class PasswordAutoFillManagerTest : public RenderViewTest { WebInputElement password_element_; private: - DISALLOW_COPY_AND_ASSIGN(PasswordAutoFillManagerTest); + DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManagerTest); }; } -using autofill::PasswordAutoFillManagerTest; +using autofill::PasswordAutofillManagerTest; // Tests that the password login is autocompleted as expected when the browser // sends back the password info. -TEST_F(PasswordAutoFillManagerTest, InitialAutocomplete) { +TEST_F(PasswordAutofillManagerTest, InitialAutocomplete) { /* * Right now we are not sending the message to the browser because we are * loading a data URL and the security origin canAccessPasswordManager() @@ -204,7 +204,7 @@ TEST_F(PasswordAutoFillManagerTest, InitialAutocomplete) { } // Tests that changing the username does not fill a read-only password field. -TEST_F(PasswordAutoFillManagerTest, NoInitialAutocompleteForReadOnly) { +TEST_F(PasswordAutofillManagerTest, NoInitialAutocompleteForReadOnly) { password_element_.setAttribute(WebString::fromUTF8("readonly"), WebString::fromUTF8("true")); @@ -218,7 +218,7 @@ TEST_F(PasswordAutoFillManagerTest, NoInitialAutocompleteForReadOnly) { } // Tests that having a non-empty username precludes the autocomplete. -TEST_F(PasswordAutoFillManagerTest, NoInitialAutocompleteForFilledField) { +TEST_F(PasswordAutofillManagerTest, NoInitialAutocompleteForFilledField) { username_element_.setValue(WebString::fromUTF8("bogus")); // Simulate the browser sending back the login info, it triggers the @@ -230,7 +230,7 @@ TEST_F(PasswordAutoFillManagerTest, NoInitialAutocompleteForFilledField) { } // Tests that editing the password clears the autocompleted password field. -TEST_F(PasswordAutoFillManagerTest, PasswordClearOnEdit) { +TEST_F(PasswordAutofillManagerTest, PasswordClearOnEdit) { // Simulate the browser sending back the login info, it triggers the // autocomplete. SimulateOnFillPasswordForm(fill_data_); @@ -244,7 +244,7 @@ TEST_F(PasswordAutoFillManagerTest, PasswordClearOnEdit) { // Tests that we only autocomplete on focus lost and with a full username match // when |wait_for_username| is true. -TEST_F(PasswordAutoFillManagerTest, WaitUsername) { +TEST_F(PasswordAutofillManagerTest, WaitUsername) { // Simulate the browser sending back the login info. fill_data_.wait_for_username = true; SimulateOnFillPasswordForm(fill_data_); @@ -277,7 +277,7 @@ TEST_F(PasswordAutoFillManagerTest, WaitUsername) { } // Tests that inline autocompletion works properly. -TEST_F(PasswordAutoFillManagerTest, InlineAutocomplete) { +TEST_F(PasswordAutofillManagerTest, InlineAutocomplete) { // Simulate the browser sending back the login info. SimulateOnFillPasswordForm(fill_data_); @@ -335,7 +335,7 @@ TEST_F(PasswordAutoFillManagerTest, InlineAutocomplete) { } // Tests that accepting an item in the suggestion drop-down works. -TEST_F(PasswordAutoFillManagerTest, SuggestionAccept) { +TEST_F(PasswordAutofillManagerTest, SuggestionAccept) { // Simulate the browser sending back the login info. SimulateOnFillPasswordForm(fill_data_); @@ -355,7 +355,7 @@ TEST_F(PasswordAutoFillManagerTest, SuggestionAccept) { } // Tests that selecting an item in the suggestion drop-down no-ops. -TEST_F(PasswordAutoFillManagerTest, SuggestionSelect) { +TEST_F(PasswordAutofillManagerTest, SuggestionSelect) { // Simulate the browser sending back the login info. SimulateOnFillPasswordForm(fill_data_); diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index ac2d0eb..9f0057c 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -22,8 +22,8 @@ #include "base/time.h" #include "base/utf_string_conversions.h" #include "build/build_config.h" -#include "chrome/common/autofill_messages.h" #include "chrome/common/appcache/appcache_dispatcher.h" +#include "chrome/common/autofill_messages.h" #include "chrome/common/bindings_policy.h" #include "chrome/common/child_process_logging.h" #include "chrome/common/chrome_constants.h" @@ -92,8 +92,8 @@ #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" #include "chrome/renderer/searchbox.h" #include "chrome/renderer/speech_input_dispatcher.h" -#include "chrome/renderer/spellchecker/spellcheck_provider.h" #include "chrome/renderer/spellchecker/spellcheck.h" +#include "chrome/renderer/spellchecker/spellcheck_provider.h" #include "chrome/renderer/translate_helper.h" #include "chrome/renderer/user_script_idle_scheduler.h" #include "chrome/renderer/user_script_slave.h" @@ -165,8 +165,8 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" #include "third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "ui/base/message_box_flags.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/message_box_flags.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/favicon_size.h" @@ -174,8 +174,8 @@ #include "ui/gfx/point.h" #include "ui/gfx/rect.h" #include "ui/gfx/skbitmap_operations.h" -#include "v8/include/v8.h" #include "v8/include/v8-testing.h" +#include "v8/include/v8.h" #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/glue/alt_error_page_resource_fetcher.h" #include "webkit/glue/context_menu.h" @@ -286,7 +286,7 @@ using WebKit::WebWorkerClient; using appcache::WebApplicationCacheHostImpl; using autofill::AutoFillAgent; using autofill::FormManager; -using autofill::PasswordAutoFillManager; +using autofill::PasswordAutofillManager; using base::Time; using base::TimeDelta; using webkit_glue::AltErrorPageResourceFetcher; @@ -621,8 +621,8 @@ RenderView::RenderView(RenderThreadBase* render_thread, notification_provider_ = new NotificationProvider(this); devtools_agent_ = new DevToolsAgent(this); - PasswordAutoFillManager* password_autofill_manager = - new PasswordAutoFillManager(this); + PasswordAutofillManager* password_autofill_manager = + new PasswordAutofillManager(this); AutoFillAgent* autofill_agent = new AutoFillAgent(this, password_autofill_manager); diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc index 1cba1c9..95a7b28 100644 --- a/chrome/test/render_view_test.cc +++ b/chrome/test/render_view_test.cc @@ -40,7 +40,7 @@ using WebKit::WebScriptSource; using WebKit::WebString; using WebKit::WebURLRequest; using autofill::AutoFillAgent; -using autofill::PasswordAutoFillManager; +using autofill::PasswordAutofillManager; namespace { const int32 kRouteId = 5; @@ -140,10 +140,10 @@ void RenderViewTest::SetUp() { // Attach a pseudo keyboard device to this object. mock_keyboard_.reset(new MockKeyboard()); - // RenderView doesn't expose it's PasswordAutoFillManager or + // RenderView doesn't expose it's PasswordAutofillManager or // AutoFillHelper objects, because it has no need to store them directly // (they're stored as RenderViewObserver*). So just create another set. - password_autofill_ = new PasswordAutoFillManager(view_); + password_autofill_ = new PasswordAutofillManager(view_); autofill_agent_ = new AutoFillAgent(view_, password_autofill_); } diff --git a/chrome/test/render_view_test.h b/chrome/test/render_view_test.h index d88fdf1..96e9c77 100644 --- a/chrome/test/render_view_test.h +++ b/chrome/test/render_view_test.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. @@ -23,7 +23,7 @@ namespace autofill { class AutoFillAgent; -class PasswordAutoFillManager; +class PasswordAutofillManager; } class MockRenderProcess; @@ -104,7 +104,7 @@ class RenderViewTest : public testing::Test { scoped_ptr<CommandLine> command_line_; scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; - autofill::PasswordAutoFillManager* password_autofill_; + autofill::PasswordAutofillManager* password_autofill_; autofill::AutoFillAgent* autofill_agent_; }; diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index df3c768..f837d98 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -400,7 +400,7 @@ void TabContents::AddObservers() { printing_.reset(new printing::PrintViewManager(this)); print_preview_.reset(new printing::PrintPreviewMessageHandler(this)); fav_icon_helper_.reset(new FavIconHelper(this)); - autofill_manager_.reset(new AutoFillManager(this)); + autofill_manager_.reset(new AutofillManager(this)); autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this)); prerender_plt_recorder_.reset(new prerender::PrerenderPLTRecorder(this)); desktop_notification_handler_.reset( diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h index a8a3574..12bc56a 100644 --- a/content/browser/tab_contents/tab_contents.h +++ b/content/browser/tab_contents/tab_contents.h @@ -65,7 +65,7 @@ class ClientSideDetectionHost; } class AutocompleteHistoryManager; -class AutoFillManager; +class AutofillManager; class BlockedContentContainer; class WebUI; class DesktopNotificationHandlerForTC; @@ -711,7 +711,7 @@ class TabContents : public PageNavigator, AutocompleteHistoryManager* autocomplete_history_manager() { return autocomplete_history_manager_.get(); } - AutoFillManager* autofill_manager() { return autofill_manager_.get(); } + AutofillManager* autofill_manager() { return autofill_manager_.get(); } safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() { return safebrowsing_detection_host_.get(); @@ -1077,8 +1077,8 @@ class TabContents : public PageNavigator, // AutocompleteHistoryManager. scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; - // AutoFillManager. - scoped_ptr<AutoFillManager> autofill_manager_; + // AutofillManager. + scoped_ptr<AutofillManager> autofill_manager_; // Handles plugin messages. scoped_ptr<PluginObserver> plugin_observer_; diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 0bb2308..6b93368 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -2774,7 +2774,7 @@ fun:_ZN19PersonalDataManager12LoadProfilesEv fun:_ZN19PersonalDataManager4InitEP7Profile fun:_ZN11ProfileImpl22GetPersonalDataManagerEv - fun:_ZN15AutoFillManagerC1EP11TabContents + fun:_ZN15AutofillManagerC1EP11TabContents ... fun:_ZN11TabContentsC1EP7ProfileP12SiteInstanceiPKS_P23SessionStorageNamespace fun:_ZN7Browser18TabContentsFactoryEP7ProfileP12SiteInstanceiPK11TabContentsP23SessionStorageNamespace |