OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/app_menu_model.h" | 5 #include "chrome/browser/app_menu_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 if (browser_defaults::kShowAboutMenuItem) { | 81 if (browser_defaults::kShowAboutMenuItem) { |
82 AddItem(IDC_ABOUT, | 82 AddItem(IDC_ABOUT, |
83 l10n_util::GetStringFUTF16( | 83 l10n_util::GetStringFUTF16( |
84 IDS_ABOUT, | 84 IDS_ABOUT, |
85 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); | 85 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); |
86 } | 86 } |
87 AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); | 87 AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); |
88 if (browser_defaults::kShowExitMenuItem) { | 88 if (browser_defaults::kShowExitMenuItem) { |
89 AddSeparator(); | 89 AddSeparator(); |
| 90 #if defined(OS_CHROMEOS) |
| 91 AddItemWithStringId(IDC_EXIT, IDS_SIGN_OUT); |
| 92 #else |
90 AddItemWithStringId(IDC_EXIT, IDS_EXIT); | 93 AddItemWithStringId(IDC_EXIT, IDS_EXIT); |
| 94 #endif |
91 } | 95 } |
92 } | 96 } |
93 | 97 |
94 bool AppMenuModel::BuildProfileSubMenu() { | 98 bool AppMenuModel::BuildProfileSubMenu() { |
95 // Nothing to do if the menu has gone away. | 99 // Nothing to do if the menu has gone away. |
96 if (!profiles_menu_contents_.get()) | 100 if (!profiles_menu_contents_.get()) |
97 return false; | 101 return false; |
98 | 102 |
99 // Triggers profile list refresh in case it's changed. | 103 // Triggers profile list refresh in case it's changed. |
100 UserDataManager::Get()->RefreshUserDataDirProfiles(); | 104 UserDataManager::Get()->RefreshUserDataDirProfiles(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 150 } |
147 | 151 |
148 string16 AppMenuModel::GetSyncMenuLabel() const { | 152 string16 AppMenuModel::GetSyncMenuLabel() const { |
149 return sync_ui_util::GetSyncMenuLabel( | 153 return sync_ui_util::GetSyncMenuLabel( |
150 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); | 154 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); |
151 } | 155 } |
152 | 156 |
153 bool AppMenuModel::IsSyncItem(int index) const { | 157 bool AppMenuModel::IsSyncItem(int index) const { |
154 return GetCommandIdAt(index) == IDC_SYNC_BOOKMARKS; | 158 return GetCommandIdAt(index) == IDC_SYNC_BOOKMARKS; |
155 } | 159 } |
OLD | NEW |