Chromium Code Reviews| Index: chrome/browser/ui/toolbar/media_router_contextual_menu.cc |
| diff --git a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc |
| index d0990e20b8568b7028064e75d5a44c9abf2a2855..c67816f26cd44e9447a2d5d926d7d1eabc03d99c 100644 |
| --- a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc |
| +++ b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc |
| @@ -22,9 +22,7 @@ |
| #if defined(GOOGLE_CHROME_BUILD) |
| #include "chrome/browser/signin/signin_manager_factory.h" |
| -#include "chrome/browser/sync/profile_sync_service_factory.h" |
| #include "chrome/common/pref_names.h" |
| -#include "components/browser_sync/browser/profile_sync_service.h" |
| #include "components/prefs/pref_service.h" |
| #include "components/signin/core/browser/signin_manager.h" |
| #endif // defined(GOOGLE_CHROME_BUILD) |
| @@ -71,13 +69,11 @@ bool MediaRouterContextualMenu::IsCommandIdVisible(int command_id) const { |
| #if defined(GOOGLE_CHROME_BUILD) |
| if (command_id == IDC_MEDIA_ROUTER_CLOUD_SERVICES_TOGGLE) { |
| // Cloud services preference is not set or used if the user is not signed |
| - // in or has disabled sync. |
| + // in. |
| if (browser_->profile()->IsSyncAllowed()) { |
|
imcheng
2016/06/20 21:29:03
Do we still need to check IsSyncAllowed()?
apacible
2016/06/22 05:34:48
Removed.
|
| SigninManagerBase* signin_manager = |
| SigninManagerFactory::GetForProfile(browser_->profile()); |
| - return signin_manager && signin_manager->IsAuthenticated() && |
| - ProfileSyncServiceFactory::GetForProfile( |
| - browser_->profile())->IsSyncActive(); |
| + return signin_manager && signin_manager->IsAuthenticated(); |
| } |
| return false; |
| } |