Commit 49385da6 authored by akalin@chromium.org's avatar akalin@chromium.org

[Sync] [Mac] Show sync menu item in app menu even in incognito mode

BUG=91682
TEST=Open Chrome, open incognito window, check app menu to make sure there is an item for sync


Review URL: http://codereview.chromium.org/7511024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95568 0039d316-1c4b-4281-b951-d872f2087c98
parent 8b2e9f39
...@@ -3771,7 +3771,7 @@ void Browser::OnStateChanged() { ...@@ -3771,7 +3771,7 @@ void Browser::OnStateChanged() {
#endif #endif
command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS,
show_main_ui && profile_->IsSyncAccessible()); show_main_ui && profile_->GetOriginalProfile()->IsSyncAccessible());
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -4039,7 +4039,7 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) { ...@@ -4039,7 +4039,7 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) {
browser_defaults::bookmarks_enabled && show_main_ui); browser_defaults::bookmarks_enabled && show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui); command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS,
show_main_ui && profile_->IsSyncAccessible()); show_main_ui && profile_->GetOriginalProfile()->IsSyncAccessible());
command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui); command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui); command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui);
......
...@@ -1049,10 +1049,13 @@ enum { ...@@ -1049,10 +1049,13 @@ enum {
} }
break; break;
} }
case IDC_SYNC_BOOKMARKS: case IDC_SYNC_BOOKMARKS: {
enable &= browser_->profile()->IsSyncAccessible(); Profile* original_profile =
sync_ui_util::UpdateSyncItem(item, enable, browser_->profile()); browser_->profile()->GetOriginalProfile();
enable &= original_profile->IsSyncAccessible();
sync_ui_util::UpdateSyncItem(item, enable, original_profile);
break; break;
}
default: default:
// Special handling for the contents of the Text Encoding submenu. On // Special handling for the contents of the Text Encoding submenu. On
// Mac OS, instead of enabling/disabling the top-level menu item, we // Mac OS, instead of enabling/disabling the top-level menu item, we
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment