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

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

Issue 953723003: Guest mode doesn't show the Bookmarks item in Wrench Menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Browser test. Created 5 years, 9 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
« no previous file with comments | « chrome/browser/profiles/profile_window_browsertest.cc ('k') | no next file » | 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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 if (extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) 839 if (extensions::FeatureSwitch::extension_action_redesign()->IsEnabled())
840 CreateExtensionToolbarOverflowMenu(); 840 CreateExtensionToolbarOverflowMenu();
841 841
842 AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB); 842 AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB);
843 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); 843 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW);
844 844
845 if (ShouldShowNewIncognitoWindowMenuItem()) 845 if (ShouldShowNewIncognitoWindowMenuItem())
846 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 846 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
847 847
848 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_)); 848 if (!browser_->profile()->IsGuestSession()) {
849 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU, 849 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
850 bookmark_sub_menu_model_.get()); 850 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
851 bookmark_sub_menu_model_.get());
852 }
851 853
852 if (!browser_->profile()->IsOffTheRecord()) { 854 if (!browser_->profile()->IsOffTheRecord()) {
853 recent_tabs_sub_menu_model_.reset(new RecentTabsSubMenuModel(provider_, 855 recent_tabs_sub_menu_model_.reset(new RecentTabsSubMenuModel(provider_,
854 browser_, 856 browser_,
855 NULL)); 857 NULL));
856 AddSubMenuWithStringId(IDC_RECENT_TABS_MENU, IDS_RECENT_TABS_MENU, 858 AddSubMenuWithStringId(IDC_RECENT_TABS_MENU, IDS_RECENT_TABS_MENU,
857 recent_tabs_sub_menu_model_.get()); 859 recent_tabs_sub_menu_model_.get());
858 } 860 }
859 861
860 #if defined(OS_WIN) 862 #if defined(OS_WIN)
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 ->GetZoomPercent(); 1086 ->GetZoomPercent();
1085 } 1087 }
1086 zoom_label_ = l10n_util::GetStringFUTF16( 1088 zoom_label_ = l10n_util::GetStringFUTF16(
1087 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 1089 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
1088 } 1090 }
1089 1091
1090 void WrenchMenuModel::OnZoomLevelChanged( 1092 void WrenchMenuModel::OnZoomLevelChanged(
1091 const content::HostZoomMap::ZoomLevelChange& change) { 1093 const content::HostZoomMap::ZoomLevelChange& change) {
1092 UpdateZoomControls(); 1094 UpdateZoomControls();
1093 } 1095 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_window_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698