| Index: chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
|
| diff --git a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
|
| index dc9c475f6f9dc46518bb0795aeb7e3b78ae88c81..c75b3c73da27b2145ac17b1ce200eb6f5f04027d 100644
|
| --- a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
|
| +++ b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
|
| @@ -806,20 +806,19 @@ void MediaRouterWebUIMessageHandler::MaybeUpdateFirstRunFlowData() {
|
| pref_service->GetBoolean(prefs::kMediaRouterFirstRunFlowAcknowledged);
|
| bool show_cloud_pref = false;
|
| #if defined(GOOGLE_CHROME_BUILD)
|
| - // Cloud services preference is shown if user is logged in and has sync
|
| - // enabled. If the user enables sync after acknowledging the first run flow,
|
| - // this is treated as the user opting into Google services, including cloud
|
| - // services, if the browser is a Chrome branded build.
|
| - if (!pref_service->GetBoolean(prefs::kMediaRouterCloudServicesPrefSet) &&
|
| - profile->IsSyncAllowed()) {
|
| + // Cloud services preference is shown if user is logged in. If the user
|
| + // enables sync after acknowledging the first run flow, this is treated as
|
| + // the user opting into Google services, including cloud services, if the
|
| + // browser is a Chrome branded build.
|
| + if (!pref_service->GetBoolean(prefs::kMediaRouterCloudServicesPrefSet)) {
|
| SigninManagerBase* signin_manager =
|
| SigninManagerFactory::GetForProfile(profile);
|
| - if (signin_manager && signin_manager->IsAuthenticated() &&
|
| - ProfileSyncServiceFactory::GetForProfile(profile)->IsSyncActive()) {
|
| + if (signin_manager && signin_manager->IsAuthenticated()) {
|
| // If the user had previously acknowledged the first run flow without
|
| // being shown the cloud services option, and is now logged in with sync
|
| // enabled, turn on cloud services.
|
| - if (first_run_flow_acknowledged) {
|
| + if (first_run_flow_acknowledged &&
|
| + ProfileSyncServiceFactory::GetForProfile(profile)->IsSyncActive()) {
|
| pref_service->SetBoolean(prefs::kMediaRouterEnableCloudServices, true);
|
| pref_service->SetBoolean(prefs::kMediaRouterCloudServicesPrefSet,
|
| true);
|
|
|