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

Unified Diff: chrome/browser/ui/webui/options/intents_settings_handler.cc

Issue 7775001: Do not check against child_count() > 0, instead check if node is not empty(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « chrome/browser/ui/intents/intents_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/intents_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/intents_settings_handler.cc b/chrome/browser/ui/webui/options/intents_settings_handler.cc
index 42f4868ee144312dd2b68769646f96ada45b2400..2656e72b2c8195a45dc7abae87c1363ba721f865 100644
--- a/chrome/browser/ui/webui/options/intents_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/intents_settings_handler.cc
@@ -103,7 +103,7 @@ void IntentsSettingsHandler::RemoveIntent(const base::ListValue* args) {
void IntentsSettingsHandler::RemoveOrigin(IntentsTreeNode* node) {
// TODO(gbillock): This is a known batch update. Worth optimizing?
- while (node->child_count() > 0) {
+ while (!node->empty()) {
IntentsTreeNode* cnode = node->GetChild(0);
CHECK(cnode->Type() == IntentsTreeNode::TYPE_SERVICE);
ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(cnode);
« no previous file with comments | « chrome/browser/ui/intents/intents_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698