diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-03 15:51:09 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-03 15:51:09 +0000 |
commit | 1a68fc8756a55af58135cdd860393c3fd8e12a1a (patch) | |
tree | b1fad96238c9c24c2375684bd9d33de70a4b9455 /chrome/browser/bookmarks | |
parent | c26b4f1fdd2104673654e34a34d80b68d51bd146 (diff) | |
download | chromium_src-1a68fc8756a55af58135cdd860393c3fd8e12a1a.zip chromium_src-1a68fc8756a55af58135cdd860393c3fd8e12a1a.tar.gz chromium_src-1a68fc8756a55af58135cdd860393c3fd8e12a1a.tar.bz2 |
GTK uses a different controller for the bookmark bar view context menu
than toolkit_views and this adds the same check for incognito pref that
I added for views.
BUG=66413
TEST=None
Review URL: http://codereview.chromium.org/6368076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_context_menu_controller.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc index c770315..85a2559 100644 --- a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc +++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -244,10 +244,12 @@ bool BookmarkContextMenuController::IsCommandIdEnabled(int command_id) const { selection_[0]->GetParent() == model_->root_node()); switch (command_id) { case IDC_BOOKMARK_BAR_OPEN_INCOGNITO: - return !profile_->IsOffTheRecord(); + return !profile_->IsOffTheRecord() && + profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled); case IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO: - return HasURLs() && !profile_->IsOffTheRecord(); + return HasURLs() && !profile_->IsOffTheRecord() && + profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled); case IDC_BOOKMARK_BAR_OPEN_ALL: case IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW: |