summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--chrome/app/breakpad_mac.mm2
-rw-r--r--chrome/app/scoped_ole_initializer.h2
-rw-r--r--chrome/browser/about_flags.cc6
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.cc4
-rw-r--r--chrome/browser/app_controller_mac.mm6
-rw-r--r--chrome/browser/appcache/appcache_dispatcher_host.cc6
-rw-r--r--chrome/browser/appcache/appcache_frontend_proxy.cc2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc10
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm2
-rw-r--r--chrome/browser/autocomplete/history_provider.cc2
-rw-r--r--chrome/browser/autocomplete_history_manager.cc2
-rw-r--r--chrome/browser/autofill/autofill_cc_infobar_win.cc2
-rw-r--r--chrome/browser/autofill/autofill_dialog_controller_mac.mm8
-rw-r--r--chrome/browser/autofill/autofill_manager.cc12
-rw-r--r--chrome/browser/autofill/contact_info.cc2
-rw-r--r--chrome/browser/autofill/select_control_handler.cc2
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/automation/automation_resource_message_filter.cc2
-rw-r--r--chrome/browser/automation/automation_resource_tracker.cc2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc8
-rw-r--r--chrome/browser/automation/ui_controls_linux.cc4
-rw-r--r--chrome/browser/automation/ui_controls_win.cc4
-rw-r--r--chrome/browser/automation/url_request_automation_job.cc2
24 files changed, 48 insertions, 47 deletions
diff --git a/AUTHORS b/AUTHORS
index 89efed3..54553c4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -93,3 +93,4 @@ Lauri Oherd <lauri.oherd@gmail.com>
Ben Karel <eschew@gmail.com>
Sam McDonald <sam@sammcd.com>
Magnus Danielsson <fuzzac@gmail.com>
+Kushal Pisavadia <kushi.p@gmail.com>
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index e7c40df..bc41f5d 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -45,7 +45,7 @@ void DestructCrashReporter() {
// Only called for a branded build of Chrome.app.
void InitCrashReporter() {
- DCHECK(gBreakpadRef == NULL);
+ DCHECK(!gBreakpadRef);
base::mac::ScopedNSAutoreleasePool autorelease_pool;
// Check whether crash reporting should be enabled. If enterprise
diff --git a/chrome/app/scoped_ole_initializer.h b/chrome/app/scoped_ole_initializer.h
index 0745c9d..525bc7f 100644
--- a/chrome/app/scoped_ole_initializer.h
+++ b/chrome/app/scoped_ole_initializer.h
@@ -21,7 +21,7 @@ class ScopedOleInitializer {
public:
ScopedOleInitializer() {
int ole_result = OleInitialize(NULL);
- DCHECK(ole_result == S_OK);
+ DCHECK_EQ(ole_result, S_OK);
}
~ScopedOleInitializer() {
OleUninitialize();
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index f2374ed..2c67326 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -328,7 +328,7 @@ void SetEnabledFlags(
// Returns the name used in prefs for the choice at the specified index.
std::string NameForChoice(const Experiment& e, int index) {
- DCHECK(e.type == Experiment::MULTI_VALUE);
+ DCHECK_EQ(e.type, Experiment::MULTI_VALUE);
DCHECK(index < e.num_choices);
return std::string(e.internal_name) + about_flags::testing::kMultiSeparator +
base::IntToString(index);
@@ -339,7 +339,7 @@ void AddInternalName(const Experiment& e, std::set<std::string>* names) {
if (e.type == Experiment::SINGLE_VALUE) {
names->insert(e.internal_name);
} else {
- DCHECK(e.type == Experiment::MULTI_VALUE);
+ DCHECK_EQ(e.type, Experiment::MULTI_VALUE);
for (int i = 0; i < e.num_choices; ++i)
names->insert(NameForChoice(e, i));
}
@@ -421,7 +421,7 @@ void GetSanitizedEnabledFlagsForCurrentPlatform(
// Returns the Value representing the choice data in the specified experiment.
Value* CreateChoiceData(const Experiment& experiment,
const std::set<std::string>& enabled_experiments) {
- DCHECK(experiment.type == Experiment::MULTI_VALUE);
+ DCHECK_EQ(experiment.type, Experiment::MULTI_VALUE);
ListValue* result = new ListValue;
for (int i = 0; i < experiment.num_choices; ++i) {
const Experiment::Choice& choice = experiment.choices[i];
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc
index b143c6a..ec0614a 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -93,7 +93,7 @@ void AlternateNavURLFetcher::OnURLFetchComplete(
int response_code,
const ResponseCookies& cookies,
const std::string& data) {
- DCHECK(fetcher_.get() == source);
+ DCHECK_EQ(fetcher_.get(), source);
SetStatusFromURLFetch(url, status, response_code);
ShowInfobarIfPossible();
}
@@ -111,7 +111,7 @@ string16 AlternateNavURLFetcher::GetMessageTextWithOffset(
size_t* link_offset) const {
const string16 label = l10n_util::GetStringFUTF16(
IDS_ALTERNATE_NAV_URL_VIEW_LABEL, string16(), link_offset);
- DCHECK(*link_offset != string16::npos);
+ DCHECK_NE(*link_offset, string16::npos);
return label;
}
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index cf49d4a..7403330 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1118,7 +1118,7 @@ void RecordLastRunAppBundlePath() {
// window controller.
- (void)prefsWindowClosed:(NSNotification*)notification {
NSWindow* window = [prefsController_ window];
- DCHECK([notification object] == window);
+ DCHECK_EQ([notification object], window);
NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
[defaultCenter removeObserver:self
name:NSWindowWillCloseNotification
@@ -1171,7 +1171,7 @@ void RecordLastRunAppBundlePath() {
// window controller.
- (void)aboutWindowClosed:(NSNotification*)notification {
NSWindow* window = [aboutController_ window];
- DCHECK(window == [notification object]);
+ DCHECK_EQ(window, [notification object]);
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:NSWindowWillCloseNotification
@@ -1239,7 +1239,7 @@ void RecordLastRunAppBundlePath() {
for (ExtensionList::const_iterator cursor = applications.begin();
cursor != applications.end();
++cursor, ++position) {
- DCHECK(position == applications.GetPosition(*cursor));
+ DCHECK_EQ(position, applications.GetPosition(*cursor));
NSString* itemStr =
base::SysUTF16ToNSString(UTF8ToUTF16((*cursor)->name()));
scoped_nsobject<NSMenuItem> appItem([[NSMenuItem alloc]
diff --git a/chrome/browser/appcache/appcache_dispatcher_host.cc b/chrome/browser/appcache/appcache_dispatcher_host.cc
index 15798ea..4c1a64a 100644
--- a/chrome/browser/appcache/appcache_dispatcher_host.cc
+++ b/chrome/browser/appcache/appcache_dispatcher_host.cc
@@ -217,21 +217,21 @@ void AppCacheDispatcherHost::OnSwapCache(int host_id,
void AppCacheDispatcherHost::GetStatusCallback(
appcache::Status status, void* param) {
IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param);
- DCHECK(reply_msg == pending_reply_msg_.get());
+ DCHECK_EQ(reply_msg, pending_reply_msg_.get());
AppCacheMsg_GetStatus::WriteReplyParams(reply_msg, status);
Send(pending_reply_msg_.release());
}
void AppCacheDispatcherHost::StartUpdateCallback(bool result, void* param) {
IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param);
- DCHECK(reply_msg == pending_reply_msg_.get());
+ DCHECK_EQ(reply_msg, pending_reply_msg_.get());
AppCacheMsg_StartUpdate::WriteReplyParams(reply_msg, result);
Send(pending_reply_msg_.release());
}
void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) {
IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param);
- DCHECK(reply_msg == pending_reply_msg_.get());
+ DCHECK_EQ(reply_msg, pending_reply_msg_.get());
AppCacheMsg_SwapCache::WriteReplyParams(reply_msg, result);
Send(pending_reply_msg_.release());
}
diff --git a/chrome/browser/appcache/appcache_frontend_proxy.cc b/chrome/browser/appcache/appcache_frontend_proxy.cc
index c82cb57..d181b14 100644
--- a/chrome/browser/appcache/appcache_frontend_proxy.cc
+++ b/chrome/browser/appcache/appcache_frontend_proxy.cc
@@ -22,7 +22,7 @@ void AppCacheFrontendProxy::OnStatusChanged(const std::vector<int>& host_ids,
void AppCacheFrontendProxy::OnEventRaised(const std::vector<int>& host_ids,
appcache::EventID event_id) {
- DCHECK(event_id != appcache::PROGRESS_EVENT); // See OnProgressEventRaised.
+ DCHECK_NE(event_id, appcache::PROGRESS_EVENT); // See OnProgressEventRaised.
sender_->Send(new AppCacheMsg_EventRaised(host_ids, event_id));
}
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index ba736c0..9645a45 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -347,7 +347,7 @@ PropertyAccessor<AutocompleteEditState>* GetStateAccessor() {
class PaintPatcher {
public:
PaintPatcher() : refcount_(0) { }
- ~PaintPatcher() { DCHECK(refcount_ == 0); }
+ ~PaintPatcher() { DCHECK_EQ(refcount_, 0U); }
void RefPatch() {
if (refcount_ == 0) {
@@ -1089,7 +1089,7 @@ bool AutocompleteEditViewWin::IsItemForCommandIdDynamic(int command_id) const {
string16 AutocompleteEditViewWin::GetLabelForCommandId(
int command_id) const {
- DCHECK(command_id == IDS_PASTE_AND_GO);
+ DCHECK_EQ(command_id, IDS_PASTE_AND_GO);
return l10n_util::GetStringUTF16(model_->is_paste_and_search() ?
IDS_PASTE_AND_SEARCH : IDS_PASTE_AND_GO);
}
@@ -2068,7 +2068,7 @@ void AutocompleteEditViewWin::GetSelection(CHARRANGE& sel) const {
return;
ScopedComPtr<ITextSelection> selection;
const HRESULT hr = text_object_model->GetSelection(selection.Receive());
- DCHECK(hr == S_OK);
+ DCHECK_EQ(hr, S_OK);
long flags;
selection->GetFlags(&flags);
if (flags & tomSelStartActive)
@@ -2098,7 +2098,7 @@ void AutocompleteEditViewWin::SetSelection(LONG start, LONG end) {
return;
ScopedComPtr<ITextSelection> selection;
const HRESULT hr = text_object_model->GetSelection(selection.Receive());
- DCHECK(hr == S_OK);
+ DCHECK_EQ(hr, S_OK);
selection->SetFlags(tomSelStartActive);
}
@@ -2334,7 +2334,7 @@ void AutocompleteEditViewWin::DrawSlashForInsecureScheme(
void AutocompleteEditViewWin::DrawDropHighlight(
HDC hdc, const CRect& client_rect, const CRect& paint_clip_rect) {
- DCHECK(drop_highlight_position_ != -1);
+ DCHECK_NE(drop_highlight_position_, -1);
const int highlight_y = client_rect.top + font_y_adjustment_;
const int highlight_x = PosFromChar(drop_highlight_position_).x - 1;
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 3d3bd55..3149c15 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -177,7 +177,7 @@ NSMutableAttributedString* AutocompletePopupViewMac::ElideString(
// The ellipses should be the last character, and everything before
// that should match the original string.
const size_t i(elided.size() - 1);
- DCHECK(0 != elided.compare(0, i, originalString));
+ DCHECK_NE(0, elided.compare(0, i, originalString));
// Replace the end of |aString| with the ellipses from |elided|.
NSString* s = base::SysUTF16ToNSString(elided.substr(i));
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index 4b1d9a3..b44e314 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/chrome/browser/autocomplete/history_provider.cc
@@ -135,7 +135,7 @@ size_t HistoryProvider::TrimHttpPrefix(string16* url) {
return 0;
size_t scheme_pos =
url->find(ASCIIToUTF16(chrome::kHttpScheme) + char16(':'));
- DCHECK(scheme_pos != string16::npos);
+ DCHECK_NE(scheme_pos, string16::npos);
// Erase scheme plus up to two slashes.
size_t prefix_end = scheme_pos + strlen(chrome::kHttpScheme) + 1;
diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc
index 112e063..ace943db 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.cc
@@ -183,7 +183,7 @@ void AutocompleteHistoryManager::OnWebDataServiceRequestDone(
return;
}
- DCHECK(result->GetType() == AUTOFILL_VALUE_RESULT);
+ DCHECK_EQ(result->GetType(), AUTOFILL_VALUE_RESULT);
const WDResult<std::vector<string16> >* autofill_result =
static_cast<const WDResult<std::vector<string16> >*>(result);
std::vector<string16> suggestions = autofill_result->GetValue();
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);
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index e5091f3..a114816 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -838,7 +838,7 @@ void AutomationProvider::GetEnabledExtensions(
void AutomationProvider::WaitForExtensionTestResult(
IPC::Message* reply_message) {
- DCHECK(reply_message_ == NULL);
+ DCHECK(!reply_message_);
reply_message_ = reply_message;
// Call MaybeSendResult, because the result might have come in before
// we were waiting on it.
diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc
index 8fc76a6..e029bf0 100644
--- a/chrome/browser/automation/automation_resource_message_filter.cc
+++ b/chrome/browser/automation/automation_resource_message_filter.cc
@@ -121,7 +121,7 @@ AutomationResourceMessageFilter::~AutomationResourceMessageFilter() {
// Called on the IPC thread:
void AutomationResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) {
- DCHECK(channel_ == NULL);
+ DCHECK(!channel_);
channel_ = channel;
}
diff --git a/chrome/browser/automation/automation_resource_tracker.cc b/chrome/browser/automation/automation_resource_tracker.cc
index 82c384a..09e0ed2 100644
--- a/chrome/browser/automation/automation_resource_tracker.cc
+++ b/chrome/browser/automation/automation_resource_tracker.cc
@@ -34,7 +34,7 @@ void AutomationResourceTrackerImpl::RemoveImpl(const void* resource) {
return;
int handle = resource_to_handle_[resource];
- DCHECK(handle_to_resource_[handle] == resource);
+ DCHECK_EQ(handle_to_resource_[handle], resource);
RemoveObserverTypeProxy(resource);
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 139143c..4d96cbe 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -720,7 +720,7 @@ void TestingAutomationProvider::GetRedirectsFrom(int tab_handle,
DCHECK(history_service) << "Tab " << tab_handle << "'s profile " <<
"has no history service";
if (history_service) {
- DCHECK(reply_message_ == NULL);
+ DCHECK(!reply_message_);
reply_message_ = reply_message;
// Schedule a history query for redirects. The response will be sent
// asynchronously from the callback the history system uses to notify us
@@ -1139,7 +1139,7 @@ void TestingAutomationProvider::ExecuteJavascript(
"window.domAutomationController.setAutomationId(%d);",
reply_message->routing_id());
- DCHECK(reply_message_ == NULL);
+ DCHECK(!reply_message_);
reply_message_ = reply_message;
tab_contents->render_view_host()->ExecuteJavascriptInWebFrame(
@@ -1163,7 +1163,7 @@ void TestingAutomationProvider::HandleInspectElementRequest(
int handle, int x, int y, IPC::Message* reply_message) {
TabContents* tab_contents = GetTabContentsForHandle(handle, NULL);
if (tab_contents) {
- DCHECK(reply_message_ == NULL);
+ DCHECK(!reply_message_);
reply_message_ = reply_message;
DevToolsManager::GetInstance()->InspectElement(
@@ -4642,7 +4642,7 @@ void TestingAutomationProvider::OnRedirectQueryComplete(
GURL from_url,
bool success,
history::RedirectList* redirects) {
- DCHECK(request_handle == redirect_query_);
+ DCHECK_EQ(request_handle, redirect_query_);
DCHECK(reply_message_ != NULL);
std::vector<GURL> redirects_gurl;
diff --git a/chrome/browser/automation/ui_controls_linux.cc b/chrome/browser/automation/ui_controls_linux.cc
index 97649ee..4748612 100644
--- a/chrome/browser/automation/ui_controls_linux.cc
+++ b/chrome/browser/automation/ui_controls_linux.cc
@@ -98,7 +98,7 @@ namespace ui_controls {
bool SendKeyPress(gfx::NativeWindow window,
ui::KeyboardCode key,
bool control, bool shift, bool alt, bool command) {
- DCHECK(command == false); // No command key on Linux
+ DCHECK_EQ(command, false); // No command key on Linux
GdkWindow* event_window = NULL;
GtkWidget* grab_widget = gtk_grab_get_current();
if (grab_widget) {
@@ -140,7 +140,7 @@ bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
bool control, bool shift,
bool alt, bool command,
Task* task) {
- DCHECK(command == false); // No command key on Linux
+ DCHECK_EQ(command, false); // No command key on Linux
int release_count = 1;
if (control)
release_count++;
diff --git a/chrome/browser/automation/ui_controls_win.cc b/chrome/browser/automation/ui_controls_win.cc
index 127ea6d..662ff63 100644
--- a/chrome/browser/automation/ui_controls_win.cc
+++ b/chrome/browser/automation/ui_controls_win.cc
@@ -327,7 +327,7 @@ bool SendMouseEventsImpl(MouseButton type, int state, Task* task) {
bool SendKeyPress(gfx::NativeWindow window, ui::KeyboardCode key,
bool control, bool shift, bool alt, bool command) {
- DCHECK(command == false); // No command key on Windows
+ DCHECK_EQ(command, false); // No command key on Windows
return SendKeyPressImpl(key, control, shift, alt, NULL);
}
@@ -336,7 +336,7 @@ bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
bool control, bool shift, bool alt,
bool command,
Task* task) {
- DCHECK(command == false); // No command key on Windows
+ DCHECK_EQ(command, false); // No command key on Windows
return SendKeyPressImpl(key, control, shift, alt, task);
}
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc
index cd5db32..0d06a0e 100644
--- a/chrome/browser/automation/url_request_automation_job.cc
+++ b/chrome/browser/automation/url_request_automation_job.cc
@@ -376,7 +376,7 @@ void URLRequestAutomationJob::Cleanup() {
id_ = 0;
tab_ = 0;
- DCHECK(message_filter_ == NULL);
+ DCHECK(!message_filter_);
DisconnectFromMessageFilter();
pending_buf_ = NULL;