summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/scoped_ole_initializer.h4
-rw-r--r--chrome/browser/about_flags.cc8
-rw-r--r--chrome/browser/app_controller_mac.mm4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc72
-rw-r--r--chrome/browser/autocomplete/history_provider.cc4
-rw-r--r--chrome/browser/autocomplete_history_manager.cc4
-rw-r--r--chrome/browser/autofill/autofill_cc_infobar_win.cc2
-rw-r--r--chrome/browser/autofill/autofill_manager.cc12
-rw-r--r--chrome/browser/autofill/contact_info.cc4
-rw-r--r--chrome/browser/autofill/select_control_handler.cc2
-rw-r--r--chrome/browser/automation/automation_resource_tracker.cc4
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc2
-rw-r--r--chrome/browser/automation/ui_controls_linux.cc15
-rw-r--r--chrome/browser/automation/ui_controls_win.cc24
-rw-r--r--content/browser/appcache/appcache_dispatcher_host.cc8
-rw-r--r--content/browser/appcache/appcache_frontend_proxy.cc4
16 files changed, 98 insertions, 75 deletions
diff --git a/chrome/app/scoped_ole_initializer.h b/chrome/app/scoped_ole_initializer.h
index 525bc7f..0bb8594 100644
--- a/chrome/app/scoped_ole_initializer.h
+++ b/chrome/app/scoped_ole_initializer.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,7 +21,7 @@ class ScopedOleInitializer {
public:
ScopedOleInitializer() {
int ole_result = OleInitialize(NULL);
- DCHECK_EQ(ole_result, S_OK);
+ DCHECK_EQ(S_OK, ole_result);
}
~ScopedOleInitializer() {
OleUninitialize();
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 34e6f79..af3cb4f 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -328,8 +328,8 @@ void SetEnabledFlags(
// Returns the name used in prefs for the choice at the specified index.
std::string NameForChoice(const Experiment& e, int index) {
- DCHECK_EQ(e.type, Experiment::MULTI_VALUE);
- DCHECK(index < e.num_choices);
+ DCHECK_EQ(Experiment::MULTI_VALUE, e.type);
+ DCHECK_LT(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_EQ(e.type, Experiment::MULTI_VALUE);
+ DCHECK_EQ(Experiment::MULTI_VALUE, e.type);
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_EQ(experiment.type, Experiment::MULTI_VALUE);
+ DCHECK_EQ(Experiment::MULTI_VALUE, experiment.type);
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/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 7403330..a6ed3fd 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1171,7 +1171,7 @@ void RecordLastRunAppBundlePath() {
// window controller.
- (void)aboutWindowClosed:(NSNotification*)notification {
NSWindow* window = [aboutController_ window];
- DCHECK_EQ(window, [notification object]);
+ DCHECK_EQ([notification object], window);
[[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_EQ(position, applications.GetPosition(*cursor));
+ DCHECK_EQ(applications.GetPosition(*cursor), position);
NSString* itemStr =
base::SysUTF16ToNSString(UTF8ToUTF16((*cursor)->name()));
scoped_nsobject<NSMenuItem> appItem([[NSMenuItem alloc]
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 9645a45..2cbd8b9 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -333,8 +333,7 @@ HDC WINAPI BeginPaintIntercept(HWND hWnd, LPPAINTSTRUCT lpPaint) {
// Intercepted method for EndPaint(). Must use __stdcall convention.
BOOL WINAPI EndPaintIntercept(HWND hWnd, const PAINTSTRUCT* lpPaint) {
- return (edit_hwnd && (hWnd == edit_hwnd)) ?
- true : ::EndPaint(hWnd, lpPaint);
+ return (edit_hwnd && (hWnd == edit_hwnd)) || ::EndPaint(hWnd, lpPaint);
}
// Returns a lazily initialized property bag accessor for saving our state in a
@@ -346,30 +345,11 @@ PropertyAccessor<AutocompleteEditState>* GetStateAccessor() {
class PaintPatcher {
public:
- PaintPatcher() : refcount_(0) { }
- ~PaintPatcher() { DCHECK_EQ(refcount_, 0U); }
-
- void RefPatch() {
- if (refcount_ == 0) {
- DCHECK(!begin_paint_.is_patched());
- DCHECK(!end_paint_.is_patched());
- begin_paint_.Patch(L"riched20.dll", "user32.dll", "BeginPaint",
- &BeginPaintIntercept);
- end_paint_.Patch(L"riched20.dll", "user32.dll", "EndPaint",
- &EndPaintIntercept);
- }
- ++refcount_;
- }
+ PaintPatcher();
+ ~PaintPatcher();
- void DerefPatch() {
- DCHECK(begin_paint_.is_patched());
- DCHECK(end_paint_.is_patched());
- --refcount_;
- if (refcount_ == 0) {
- begin_paint_.Unpatch();
- end_paint_.Unpatch();
- }
- }
+ void RefPatch();
+ void DerefPatch();
private:
size_t refcount_;
@@ -379,6 +359,35 @@ class PaintPatcher {
DISALLOW_COPY_AND_ASSIGN(PaintPatcher);
};
+PaintPatcher::PaintPatcher() : refcount_(0) {
+}
+
+PaintPatcher::~PaintPatcher() {
+ DCHECK_EQ(0U, refcount_);
+}
+
+void PaintPatcher::RefPatch() {
+ if (refcount_ == 0) {
+ DCHECK(!begin_paint_.is_patched());
+ DCHECK(!end_paint_.is_patched());
+ begin_paint_.Patch(L"riched20.dll", "user32.dll", "BeginPaint",
+ &BeginPaintIntercept);
+ end_paint_.Patch(L"riched20.dll", "user32.dll", "EndPaint",
+ &EndPaintIntercept);
+ }
+ ++refcount_;
+}
+
+void PaintPatcher::DerefPatch() {
+ DCHECK(begin_paint_.is_patched());
+ DCHECK(end_paint_.is_patched());
+ --refcount_;
+ if (refcount_ == 0) {
+ begin_paint_.Unpatch();
+ end_paint_.Unpatch();
+ }
+}
+
base::LazyInstance<PaintPatcher> g_paint_patcher(base::LINKER_INITIALIZED);
// twips are a unit of type measurement, and RichEdit controls use them
@@ -1089,7 +1098,7 @@ bool AutocompleteEditViewWin::IsItemForCommandIdDynamic(int command_id) const {
string16 AutocompleteEditViewWin::GetLabelForCommandId(
int command_id) const {
- DCHECK_EQ(command_id, IDS_PASTE_AND_GO);
+ DCHECK_EQ(IDS_PASTE_AND_GO, command_id);
return l10n_util::GetStringUTF16(model_->is_paste_and_search() ?
IDS_PASTE_AND_SEARCH : IDS_PASTE_AND_GO);
}
@@ -2068,7 +2077,7 @@ void AutocompleteEditViewWin::GetSelection(CHARRANGE& sel) const {
return;
ScopedComPtr<ITextSelection> selection;
const HRESULT hr = text_object_model->GetSelection(selection.Receive());
- DCHECK_EQ(hr, S_OK);
+ DCHECK_EQ(S_OK, hr);
long flags;
selection->GetFlags(&flags);
if (flags & tomSelStartActive)
@@ -2098,7 +2107,7 @@ void AutocompleteEditViewWin::SetSelection(LONG start, LONG end) {
return;
ScopedComPtr<ITextSelection> selection;
const HRESULT hr = text_object_model->GetSelection(selection.Receive());
- DCHECK_EQ(hr, S_OK);
+ DCHECK_EQ(S_OK, hr);
selection->SetFlags(tomSelStartActive);
}
@@ -2332,9 +2341,10 @@ void AutocompleteEditViewWin::DrawSlashForInsecureScheme(
canvas_clip_rect.top, &canvas_paint_clip_rect);
}
-void AutocompleteEditViewWin::DrawDropHighlight(
- HDC hdc, const CRect& client_rect, const CRect& paint_clip_rect) {
- DCHECK_NE(drop_highlight_position_, -1);
+void AutocompleteEditViewWin::DrawDropHighlight(HDC hdc,
+ const CRect& client_rect,
+ const CRect& paint_clip_rect) {
+ DCHECK_NE(-1, drop_highlight_position_);
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/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index b44e314..d0dc207 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/chrome/browser/autocomplete/history_provider.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.
@@ -135,7 +135,7 @@ size_t HistoryProvider::TrimHttpPrefix(string16* url) {
return 0;
size_t scheme_pos =
url->find(ASCIIToUTF16(chrome::kHttpScheme) + char16(':'));
- DCHECK_NE(scheme_pos, string16::npos);
+ DCHECK_NE(string16::npos, scheme_pos);
// 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 ace943db..17aaf38 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.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.
@@ -183,7 +183,7 @@ void AutocompleteHistoryManager::OnWebDataServiceRequestDone(
return;
}
- DCHECK_EQ(result->GetType(), AUTOFILL_VALUE_RESULT);
+ DCHECK_EQ(AUTOFILL_VALUE_RESULT, result->GetType());
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 fbb35e9..2a5eea2 100644
--- a/chrome/browser/autofill/autofill_cc_infobar_win.cc
+++ b/chrome/browser/autofill/autofill_cc_infobar_win.cc
@@ -113,7 +113,7 @@ void SaveCCInfoConfirmInfoBar::Layout() {
void SaveCCInfoConfirmInfoBar::LinkActivated(views::Link* source,
int event_flags) {
- DCHECK_EQ(source, link_);
+ DCHECK_EQ(link_, source);
DCHECK(link_->IsVisible());
DCHECK(!link_->GetText().empty());
GetDelegate()->LinkClicked(
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index f96fa91..42e8826 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_NE(autofill_type.group(), AutoFillType::CREDIT_CARD);
+ DCHECK_NE(AutoFillType::CREDIT_CARD, autofill_type.group());
FillFormField(profile, autofill_type, &(*iter));
} else {
- DCHECK_EQ(autofill_type.group(), AutoFillType::CREDIT_CARD);
+ DCHECK_EQ(AutoFillType::CREDIT_CARD, autofill_type.group());
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_NE(autofill_type.group(), AutoFillType::CREDIT_CARD);
+ DCHECK_NE(AutoFillType::CREDIT_CARD, autofill_type.group());
FillFormField(profile, autofill_type, &result.fields[j]);
} else {
- DCHECK_EQ(autofill_type.group(), AutoFillType::CREDIT_CARD);
+ DCHECK_EQ(AutoFillType::CREDIT_CARD, autofill_type.group());
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_EQ(type.group(), AutoFillType::CREDIT_CARD);
+ DCHECK_EQ(AutoFillType::CREDIT_CARD, type.group());
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_NE(type.group(), AutoFillType::CREDIT_CARD);
+ DCHECK_NE(AutoFillType::CREDIT_CARD, type.group());
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 5aea963..6b6b6ea 100644
--- a/chrome/browser/autofill/contact_info.cc
+++ b/chrome/browser/autofill/contact_info.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.
@@ -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_EQ(type.group(), AutoFillType::CONTACT_INFO);
+ DCHECK_EQ(AutoFillType::CONTACT_INFO, type.group());
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 4ceba0f..ca36090 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_EQ(field->form_control_type(), ASCIIToUTF16("select-one"));
+ DCHECK_EQ(ASCIIToUTF16("select-one"), field->form_control_type());
string16 value;
string16 field_text = form_group.GetFieldText(type);
diff --git a/chrome/browser/automation/automation_resource_tracker.cc b/chrome/browser/automation/automation_resource_tracker.cc
index 09e0ed2..f1630c2 100644
--- a/chrome/browser/automation/automation_resource_tracker.cc
+++ b/chrome/browser/automation/automation_resource_tracker.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 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 @@ void AutomationResourceTrackerImpl::RemoveImpl(const void* resource) {
return;
int handle = resource_to_handle_[resource];
- DCHECK_EQ(handle_to_resource_[handle], resource);
+ DCHECK_EQ(resource, handle_to_resource_[handle]);
RemoveObserverTypeProxy(resource);
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 0c4e6bc..d56769c 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -4752,7 +4752,7 @@ void TestingAutomationProvider::OnRedirectQueryComplete(
GURL from_url,
bool success,
history::RedirectList* redirects) {
- DCHECK_EQ(request_handle, redirect_query_);
+ DCHECK_EQ(redirect_query_, request_handle);
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 4748612..d63501a 100644
--- a/chrome/browser/automation/ui_controls_linux.cc
+++ b/chrome/browser/automation/ui_controls_linux.cc
@@ -97,8 +97,11 @@ namespace ui_controls {
bool SendKeyPress(gfx::NativeWindow window,
ui::KeyboardCode key,
- bool control, bool shift, bool alt, bool command) {
- DCHECK_EQ(command, false); // No command key on Linux
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ DCHECK(!command); // No command key on Linux
GdkWindow* event_window = NULL;
GtkWidget* grab_widget = gtk_grab_get_current();
if (grab_widget) {
@@ -137,10 +140,12 @@ bool SendKeyPress(gfx::NativeWindow window,
bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
ui::KeyboardCode key,
- bool control, bool shift,
- bool alt, bool command,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command,
Task* task) {
- DCHECK_EQ(command, false); // No command key on Linux
+ DCHECK(!command); // 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 662ff63..0544f0e 100644
--- a/chrome/browser/automation/ui_controls_win.cc
+++ b/chrome/browser/automation/ui_controls_win.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.
@@ -325,18 +325,24 @@ bool SendMouseEventsImpl(MouseButton type, int state, Task* task) {
// public functions -----------------------------------------------------------
-bool SendKeyPress(gfx::NativeWindow window, ui::KeyboardCode key,
- bool control, bool shift, bool alt, bool command) {
- DCHECK_EQ(command, false); // No command key on Windows
+bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) {
+ DCHECK(!command); // No command key on Windows
return SendKeyPressImpl(key, control, shift, alt, NULL);
}
bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
ui::KeyboardCode key,
- bool control, bool shift, bool alt,
+ bool control,
+ bool shift,
+ bool alt,
bool command,
Task* task) {
- DCHECK_EQ(command, false); // No command key on Windows
+ DCHECK(!command); // No command key on Windows
return SendKeyPressImpl(key, control, shift, alt, task);
}
@@ -360,8 +366,10 @@ bool SendMouseClick(MouseButton type) {
return SendMouseEventsImpl(type, UP | DOWN, NULL);
}
-void MoveMouseToCenterAndPress(views::View* view, MouseButton button,
- int state, Task* task) {
+void MoveMouseToCenterAndPress(views::View* view,
+ MouseButton button,
+ int state,
+ Task* task) {
DCHECK(view);
DCHECK(view->GetWidget());
gfx::Point view_center(view->width() / 2, view->height() / 2);
diff --git a/content/browser/appcache/appcache_dispatcher_host.cc b/content/browser/appcache/appcache_dispatcher_host.cc
index a634f4a..6d0246b 100644
--- a/content/browser/appcache/appcache_dispatcher_host.cc
+++ b/content/browser/appcache/appcache_dispatcher_host.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/renderer_host/browser_render_process_host.h"
-#include "content/browser/appcache/chrome_appcache_service.h"
#include "chrome/common/render_messages.h"
+#include "content/browser/appcache/chrome_appcache_service.h"
AppCacheDispatcherHost::AppCacheDispatcherHost(
net::URLRequestContext* request_context,
@@ -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_EQ(reply_msg, pending_reply_msg_.get());
+ DCHECK_EQ(pending_reply_msg_.get(), reply_msg);
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_EQ(reply_msg, pending_reply_msg_.get());
+ DCHECK_EQ(pending_reply_msg_.get(), reply_msg);
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_EQ(reply_msg, pending_reply_msg_.get());
+ DCHECK_EQ(pending_reply_msg_.get(), reply_msg);
AppCacheMsg_SwapCache::WriteReplyParams(reply_msg, result);
Send(pending_reply_msg_.release());
}
diff --git a/content/browser/appcache/appcache_frontend_proxy.cc b/content/browser/appcache/appcache_frontend_proxy.cc
index a38d029..3691007a 100644
--- a/content/browser/appcache/appcache_frontend_proxy.cc
+++ b/content/browser/appcache/appcache_frontend_proxy.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.
@@ -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_NE(event_id, appcache::PROGRESS_EVENT); // See OnProgressEventRaised.
+ DCHECK_NE(appcache::PROGRESS_EVENT, event_id); // See OnProgressEventRaised.
sender_->Send(new AppCacheMsg_EventRaised(host_ids, event_id));
}