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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 11146023: Work on separate browser contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another busted command line flag Created 8 years, 2 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
« no previous file with comments | « chrome/browser/ui/host_desktop.cc ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 #if defined(OS_CHROMEOS) 495 #if defined(OS_CHROMEOS)
496 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) 496 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession))
497 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 497 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
498 #else 498 #else
499 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 499 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
500 #endif 500 #endif
501 501
502 #endif // else of defined(OS_WIN) 502 #endif // else of defined(OS_WIN)
503 503
504 #if defined(USE_ASH) 504 #if defined(USE_ASH)
505 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAsh)) { 505 if (!ash::Shell::HasInstance())
506 if (!ash::Shell::HasInstance()) 506 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, IDS_OPEN_ASH_DESKTOP);
507 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, IDS_OPEN_ASH_DESKTOP); 507 else
508 else 508 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, IDS_CLOSE_ASH_DESKTOP);
509 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, IDS_CLOSE_ASH_DESKTOP);
510 }
511 #endif 509 #endif
512 510
513 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_)); 511 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
514 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU, 512 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
515 bookmark_sub_menu_model_.get()); 513 bookmark_sub_menu_model_.get());
516 514
517 #if defined(OS_WIN) 515 #if defined(OS_WIN)
518 if (base::win::IsMetroProcess()) { 516 if (base::win::IsMetroProcess()) {
519 // Metro mode, add the 'Relaunch Chrome in desktop mode'. 517 // Metro mode, add the 'Relaunch Chrome in desktop mode'.
520 AddSeparator(ui::SPACING_SEPARATOR); 518 AddSeparator(ui::SPACING_SEPARATOR);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 zoom_label_ = l10n_util::GetStringFUTF16( 715 zoom_label_ = l10n_util::GetStringFUTF16(
718 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 716 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
719 } 717 }
720 718
721 string16 WrenchMenuModel::GetSyncMenuLabel() const { 719 string16 WrenchMenuModel::GetSyncMenuLabel() const {
722 Profile* profile = browser_->profile()->GetOriginalProfile(); 720 Profile* profile = browser_->profile()->GetOriginalProfile();
723 return sync_ui_util::GetSyncMenuLabel( 721 return sync_ui_util::GetSyncMenuLabel(
724 ProfileSyncServiceFactory::GetForProfile(profile), 722 ProfileSyncServiceFactory::GetForProfile(profile),
725 *SigninManagerFactory::GetForProfile(profile)); 723 *SigninManagerFactory::GetForProfile(profile));
726 } 724 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/host_desktop.cc ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698