Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: chrome/browser/component_updater/component_updater_service.cc

Issue 10939010: Cleanup: avoid foo ? true : false, part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/i18n/bidi_line_iterator.cc ('k') | chrome/browser/external_protocol/external_protocol_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/component_updater_service.cc
===================================================================
--- chrome/browser/component_updater/component_updater_service.cc (revision 159076)
+++ chrome/browser/component_updater/component_updater_service.cc (working copy)
@@ -98,7 +98,7 @@
// decent chance of being unique among the registered components. It also has
// the nice property that can be trivially computed by hand.
static int CrxIdtoUMAId(const std::string& id) {
- CHECK(id.size() > 2);
+ CHECK_GT(id.size(), 2U);
return id[0] + id[1] + id[2] - ('a' * 3);
}
@@ -618,7 +618,7 @@
void CrxUpdateService::OnParseUpdateManifestSucceeded(
const UpdateManifest::Results& results) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- int update_pending = 0;
+ size_t update_pending = 0;
std::vector<UpdateManifest::Result>::const_iterator it;
for (it = results.list.begin(); it != results.list.end(); ++it) {
CrxUpdateItem* crx = FindUpdateItemById(it->extension_id);
@@ -665,7 +665,7 @@
ChangeItemStatus(CrxUpdateItem::kChecking, CrxUpdateItem::kUpToDate);
// If there are updates pending we do a short wait.
- ScheduleNextRun(update_pending ? true : false);
+ ScheduleNextRun(update_pending > 0);
}
void CrxUpdateService::OnParseUpdateManifestFailed(
« no previous file with comments | « base/i18n/bidi_line_iterator.cc ('k') | chrome/browser/external_protocol/external_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698