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

Unified Diff: chrome/browser/background_mode_manager.cc

Issue 5858004: Clean-up BackgroundModeManager-BackgroundApplicationListModel interaction (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 10 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background_mode_manager.cc
diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc
index 290eed9d9d95b7312c3c9149357ae77e31bae8c3..c3ffdef1392d29409f93ee73528acdd8c3823824 100644
--- a/chrome/browser/background_mode_manager.cc
+++ b/chrome/browser/background_mode_manager.cc
@@ -277,16 +277,15 @@ void BackgroundModeManager::UpdateStatusTrayIconContextMenu() {
menu->AddItem(IDC_OPTIONS, GetPreferencesMenuLabel());
menu->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
menu->AddSeparator();
- int application_position = 0;
+ int position = 0;
context_menu_application_offset_ = menu->GetItemCount();
for (ExtensionList::const_iterator cursor = applications_.begin();
cursor != applications_.end();
- ++cursor, ++application_position) {
+ ++cursor, ++position) {
const SkBitmap* icon = applications_.GetIcon(*cursor);
- int sort_position = applications_.GetPosition(*cursor);
- DCHECK(sort_position == application_position);
+ DCHECK(position == applications_.GetPosition(*cursor));
const std::string& name = (*cursor)->name();
- menu->AddItem(sort_position, ASCIIToUTF16(name));
+ menu->AddItem(position, UTF8ToUTF16(name));
Andrew T Wilson (Slow) 2010/12/17 01:56:22 LGTM.
if (icon)
menu->SetIcon(menu->GetItemCount() - 1, *icon);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698