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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
Index: chrome/browser/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index a25efa83ed9215700a1a0dc7acb650a0166869e3..19cb00efab1d46105abbc1867e0c9c23abfdf994 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -362,7 +362,7 @@ void RenderViewContextMenu::RecursivelyAppendExtensionItems(
ExtensionMenuItem::List children =
GetRelevantExtensionItems(item->children(), params_,
profile_, can_cross_incognito);
- if (children.size() == 0) {
+ if (children.empty()) {
menu_model->AddItem(menu_id, title);
} else {
ui::SimpleMenuModel* submenu = new ui::SimpleMenuModel(this);
@@ -720,7 +720,7 @@ void RenderViewContextMenu::AppendEditableItems() {
// If word is misspelled, give option for "Add to dictionary"
if (!params_.misspelled_word.empty()) {
- if (params_.dictionary_suggestions.size() == 0) {
+ if (params_.dictionary_suggestions.empty()) {
menu_model_.AddItem(0,
l10n_util::GetStringUTF16(
IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS));

Powered by Google App Engine
This is Rietveld 408576698