summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background_mode_manager.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-11 03:23:25 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-11 03:23:25 +0000
commitcc027af6e84ffbcb138e1f1d94226ab20893f7dc (patch)
tree6340817b24a826b425c8b52e43494ee8fd68d215 /chrome/browser/background_mode_manager.cc
parent53af27289f2c5f380cbced5cb1dd6d17cae318b1 (diff)
downloadchromium_src-cc027af6e84ffbcb138e1f1d94226ab20893f7dc.zip
chromium_src-cc027af6e84ffbcb138e1f1d94226ab20893f7dc.tar.gz
chromium_src-cc027af6e84ffbcb138e1f1d94226ab20893f7dc.tar.bz2
Avoid inserting a redundant separator in status icon menu.
When there is no application installed on chrome we are showing two separators instead of one in the menu. BUG=65648 TEST=see bug Review URL: http://codereview.chromium.org/5513008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background_mode_manager.cc')
-rw-r--r--chrome/browser/background_mode_manager.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc
index 1b70886..0b427e6 100644
--- a/chrome/browser/background_mode_manager.cc
+++ b/chrome/browser/background_mode_manager.cc
@@ -290,7 +290,8 @@ void BackgroundModeManager::UpdateStatusTrayIconContextMenu() {
if (icon)
menu->SetIcon(menu->GetItemCount() - 1, *icon);
}
- menu->AddSeparator();
+ if (applications_.size() > 0)
+ menu->AddSeparator();
menu->AddItemWithStringId(IDC_EXIT, IDS_EXIT);
context_menu_ = menu;
status_icon_->SetContextMenu(menu);