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

Unified Diff: chrome/browser/ui/toolbar/media_router_contextual_menu.cc

Issue 2093353002: [Reland] [Media Router] Allow users to update cloud services pref when sync is not active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per msw@'s comments. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ead82edcf45e724553568c7bc34979b0f1a15405..e3d5379191daca8068dd19900aaf2ba87181298d 100644
--- a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
+++ b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
@@ -23,9 +23,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)
@@ -76,15 +74,10 @@ 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.
- if (browser_->profile()->IsSyncAllowed()) {
- SigninManagerBase* signin_manager =
- SigninManagerFactory::GetForProfile(browser_->profile());
- return signin_manager && signin_manager->IsAuthenticated() &&
- ProfileSyncServiceFactory::GetForProfile(
- browser_->profile())->IsSyncActive();
- }
- return false;
+ // in.
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(browser_->profile());
+ return signin_manager && signin_manager->IsAuthenticated();
}
#endif // defined(GOOGLE_CHROME_BUILD)
return true;
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698