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

Side by Side Diff: chrome/browser/ui/profile_menu_model.cc

Issue 7138002: Add profiles to wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698