diff options
author | MHX348@motorola.com <MHX348@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-13 04:33:01 +0000 |
---|---|---|
committer | MHX348@motorola.com <MHX348@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-13 04:33:01 +0000 |
commit | 6a1daad562a000e5a8b3109d2035c9a224f04c6f (patch) | |
tree | b9e7614b394001f20937034ad1bb0d186b48e214 | |
parent | 287d2cc5e9e87ec3871d6e69cb38f1422da993d8 (diff) | |
download | chromium_src-6a1daad562a000e5a8b3109d2035c9a224f04c6f.zip chromium_src-6a1daad562a000e5a8b3109d2035c9a224f04c6f.tar.gz chromium_src-6a1daad562a000e5a8b3109d2035c9a224f04c6f.tar.bz2 |
Share this page menu item enabled within Incognito window.
Since web intents are not working in incognito window (issue 142463), hide 'share this page'
menu item in incognito mode until the issue gets fixed.
Patch from Joe Thomas <mhx348@motorola.com>.
BUG=152835
TEST=As mentioned in the bug report
Review URL: https://chromiumcodereview.appspot.com/11118010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161710 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/toolbar/action_box_menu_model.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/ui/toolbar/action_box_menu_model.cc b/chrome/browser/ui/toolbar/action_box_menu_model.cc index a8bc504..dfb3ec3 100644 --- a/chrome/browser/ui/toolbar/action_box_menu_model.cc +++ b/chrome/browser/ui/toolbar/action_box_menu_model.cc @@ -53,9 +53,14 @@ ActionBoxMenuModel::ActionBoxMenuModel(Browser* browser, SetIcon(GetIndexOfCommandId(IDC_BOOKMARK_PAGE), rb.GetNativeImageNamed(starred ? IDR_STAR_LIT : IDR_STAR)); - AddItemWithStringId(IDC_SHARE_PAGE, IDS_SHARE_PAGE); - SetIcon(GetIndexOfCommandId(IDC_SHARE_PAGE), - rb.GetNativeImageNamed(IDR_SHARE)); + // Since web intents are not working in incognito window (issue 142463), + // hide "share this page" menu item in incognito mode + // till the issue gets fixed. + if (!browser_->profile()->IsOffTheRecord()) { + AddItemWithStringId(IDC_SHARE_PAGE, IDS_SHARE_PAGE); + SetIcon(GetIndexOfCommandId(IDC_SHARE_PAGE), + rb.GetNativeImageNamed(IDR_SHARE)); + } } ActionBoxMenuModel::~ActionBoxMenuModel() { |