diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-17 22:09:18 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-17 22:09:18 +0000 |
commit | cbfd6e11dae35a249f0c4b76496be96e528584c4 (patch) | |
tree | aecbd94c006672cf1a62e4d6edf4bad162afe80a /chrome/browser/autofill | |
parent | a7a95be44281bbc0ffae6ad29133c57ccf2e4fc8 (diff) | |
download | chromium_src-cbfd6e11dae35a249f0c4b76496be96e528584c4.zip chromium_src-cbfd6e11dae35a249f0c4b76496be96e528584c4.tar.gz chromium_src-cbfd6e11dae35a249f0c4b76496be96e528584c4.tar.bz2 |
Begin the DCHECK() cleanup. Starting off with /src/chrome/a* and /src/chrome/browser/a*
BUG=58409
Review URL: http://codereview.chromium.org/6539002
Patch from Kushal Pisavadia <kushi.p@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r-- | chrome/browser/autofill/autofill_cc_infobar_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_dialog_controller_mac.mm | 8 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_manager.cc | 12 | ||||
-rw-r--r-- | chrome/browser/autofill/contact_info.cc | 2 | ||||
-rw-r--r-- | chrome/browser/autofill/select_control_handler.cc | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/autofill/autofill_cc_infobar_win.cc b/chrome/browser/autofill/autofill_cc_infobar_win.cc index d24e4f0..e6019f80 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_win.cc +++ b/chrome/browser/autofill/autofill_cc_infobar_win.cc @@ -120,7 +120,7 @@ void SaveCCInfoConfirmInfoBar::Layout() { void SaveCCInfoConfirmInfoBar::LinkActivated(views::Link* source, int event_flags) { - DCHECK(source == link_); + DCHECK_EQ(source, link_); DCHECK(link_->IsVisible()); DCHECK(!link_->GetText().empty()); GetDelegate()->LinkClicked( diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.mm b/chrome/browser/autofill/autofill_dialog_controller_mac.mm index 039d137..b046704 100644 --- a/chrome/browser/autofill/autofill_dialog_controller_mac.mm +++ b/chrome/browser/autofill/autofill_dialog_controller_mac.mm @@ -335,7 +335,7 @@ class PreferenceObserver : public NotificationObserver { - (void)addressAddDidEnd:(NSWindow*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo { - DCHECK(contextInfo == NULL); + DCHECK(!contextInfo); if (returnCode) { // Create a new address and save it to the |profiles_| list. @@ -359,10 +359,10 @@ class PreferenceObserver : public NotificationObserver { } // Add credit card sheet was dismissed. Non-zero |returnCode| indicates a save. -- (void)creditCardAddDidEnd:(NSWindow *)sheet +- (void)creditCardAddDidEnd:(NSWindow*)sheet returnCode:(int)returnCode - contextInfo:(void *)contextInfo { - DCHECK(contextInfo == NULL); + contextInfo:(void*)contextInfo { + DCHECK(!contextInfo); if (returnCode) { // Create a new credit card and save it to the |creditCards_| list. diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index 5861a4c..f96fa91 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -452,10 +452,10 @@ void AutoFillManager::OnFillAutoFillFormData(int query_id, if ((*iter) == field) { AutoFillType autofill_type(autofill_field->type()); if (profile) { - DCHECK(autofill_type.group() != AutoFillType::CREDIT_CARD); + DCHECK_NE(autofill_type.group(), AutoFillType::CREDIT_CARD); FillFormField(profile, autofill_type, &(*iter)); } else { - DCHECK(autofill_type.group() == AutoFillType::CREDIT_CARD); + DCHECK_EQ(autofill_type.group(), AutoFillType::CREDIT_CARD); FillCreditCardFormField(credit_card, autofill_type, &(*iter)); } break; @@ -491,10 +491,10 @@ void AutoFillManager::OnFillAutoFillFormData(int query_id, AutoFillType autofill_type(form_structure->field(k)->type()); if (autofill_type.group() != AutoFillType::NO_GROUP) { if (profile) { - DCHECK(autofill_type.group() != AutoFillType::CREDIT_CARD); + DCHECK_NE(autofill_type.group(), AutoFillType::CREDIT_CARD); FillFormField(profile, autofill_type, &result.fields[j]); } else { - DCHECK(autofill_type.group() == AutoFillType::CREDIT_CARD); + DCHECK_EQ(autofill_type.group(), AutoFillType::CREDIT_CARD); FillCreditCardFormField(credit_card, autofill_type, &result.fields[j]); } } @@ -873,7 +873,7 @@ void AutoFillManager::FillCreditCardFormField(const CreditCard* credit_card, AutoFillType type, webkit_glue::FormField* field) { DCHECK(credit_card); - DCHECK(type.group() == AutoFillType::CREDIT_CARD); + DCHECK_EQ(type.group(), AutoFillType::CREDIT_CARD); DCHECK(field); if (field->form_control_type() == ASCIIToUTF16("select-one")) { @@ -898,7 +898,7 @@ void AutoFillManager::FillFormField(const AutoFillProfile* profile, AutoFillType type, webkit_glue::FormField* field) { DCHECK(profile); - DCHECK(type.group() != AutoFillType::CREDIT_CARD); + DCHECK_NE(type.group(), AutoFillType::CREDIT_CARD); DCHECK(field); if (type.subgroup() == AutoFillType::PHONE_NUMBER) { diff --git a/chrome/browser/autofill/contact_info.cc b/chrome/browser/autofill/contact_info.cc index ce2e36e..5aea963 100644 --- a/chrome/browser/autofill/contact_info.cc +++ b/chrome/browser/autofill/contact_info.cc @@ -135,7 +135,7 @@ string16 ContactInfo::GetFieldText(const AutoFillType& type) const { void ContactInfo::SetInfo(const AutoFillType& type, const string16& value) { AutoFillFieldType field_type = type.field_type(); - DCHECK(type.group() == AutoFillType::CONTACT_INFO); + DCHECK_EQ(type.group(), AutoFillType::CONTACT_INFO); if (field_type == NAME_FIRST) SetFirst(value); else if (field_type == NAME_MIDDLE || field_type == NAME_MIDDLE_INITIAL) diff --git a/chrome/browser/autofill/select_control_handler.cc b/chrome/browser/autofill/select_control_handler.cc index 1d0526e..4ceba0f 100644 --- a/chrome/browser/autofill/select_control_handler.cc +++ b/chrome/browser/autofill/select_control_handler.cc @@ -485,7 +485,7 @@ void FillSelectControl(const FormGroup& form_group, AutoFillType type, webkit_glue::FormField* field) { DCHECK(field); - DCHECK(field->form_control_type() == ASCIIToUTF16("select-one")); + DCHECK_EQ(field->form_control_type(), ASCIIToUTF16("select-one")); string16 value; string16 field_text = form_group.GetFieldText(type); |