| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/profile_menu_model.h" | 5 #include "chrome/browser/ui/profile_menu_model.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 #include "grit/chromium_strings.h" |
| 8 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| 10 | 11 |
| 11 ProfileMenuModel::ProfileMenuModel() | 12 ProfileMenuModel::ProfileMenuModel() |
| 12 : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)) { | 13 : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)) { |
| 13 AddItem(COMMAND_CREATE_NEW_PROFILE, l10n_util::GetStringUTF16( | 14 const string16 short_product_name = |
| 14 IDS_PROFILES_CREATE_NEW_PROFILE_OPTION)); | 15 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| 16 AddItem(COMMAND_CREATE_NEW_PROFILE, l10n_util::GetStringFUTF16( |
| 17 IDS_PROFILES_CREATE_NEW_PROFILE_OPTION, short_product_name)); |
| 15 } | 18 } |
| 16 | 19 |
| 17 ProfileMenuModel::~ProfileMenuModel() { | 20 ProfileMenuModel::~ProfileMenuModel() { |
| 18 } | 21 } |
| 19 | 22 |
| 20 // ui::SimpleMenuModel::Delegate implementation | 23 // ui::SimpleMenuModel::Delegate implementation |
| 21 bool ProfileMenuModel::IsCommandIdChecked(int command_id) const { | 24 bool ProfileMenuModel::IsCommandIdChecked(int command_id) const { |
| 22 return false; | 25 return false; |
| 23 } | 26 } |
| 24 | 27 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 35 switch (command_id) { | 38 switch (command_id) { |
| 36 case COMMAND_CREATE_NEW_PROFILE: | 39 case COMMAND_CREATE_NEW_PROFILE: |
| 37 ProfileManager::CreateMultiProfileAsync(); | 40 ProfileManager::CreateMultiProfileAsync(); |
| 38 break; | 41 break; |
| 39 default: | 42 default: |
| 40 NOTREACHED(); | 43 NOTREACHED(); |
| 41 break; | 44 break; |
| 42 } | 45 } |
| 43 } | 46 } |
| 44 | 47 |
| OLD | NEW |