Commit 9855e9c0 authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Fix send-tab-to-self UI displayed for roaming profiles

The sync datatype doesn't provide any useful features to enterprise
users using local sync (aka roaming profiles), so displaying the UI is
unnecessary and causes confusion.

We avoid such UI by forcefully disabling the sync datatype for local
sync users, which is also sufficient to hide the UI.

Bug: 1004400
Change-Id: I3c5d93a9b78de3172550d7e63915b878c2d75099
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813346
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698921}
parent 1d6b0736
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/send_tab_to_self/send_tab_to_self_util.h"
#include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h" #include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
...@@ -73,6 +74,9 @@ IN_PROC_BROWSER_TEST_F(LocalSyncTest, ShouldStart) { ...@@ -73,6 +74,9 @@ IN_PROC_BROWSER_TEST_F(LocalSyncTest, ShouldStart) {
ASSERT_TRUE(SyncTransportActiveChecker(service).Wait()); ASSERT_TRUE(SyncTransportActiveChecker(service).Wait());
EXPECT_TRUE(service->IsLocalSyncEnabled()); EXPECT_TRUE(service->IsLocalSyncEnabled());
// Verify certain features are disabled.
EXPECT_FALSE(send_tab_to_self::IsUserSyncTypeActive(browser()->profile()));
} }
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
......
...@@ -193,6 +193,7 @@ ModelTypeSet SyncUserSettingsImpl::GetPreferredDataTypes() const { ...@@ -193,6 +193,7 @@ ModelTypeSet SyncUserSettingsImpl::GetPreferredDataTypes() const {
if (prefs_->IsLocalSyncEnabled()) { if (prefs_->IsLocalSyncEnabled()) {
types.Remove(APP_LIST); types.Remove(APP_LIST);
types.Remove(SECURITY_EVENTS); types.Remove(SECURITY_EVENTS);
types.Remove(SEND_TAB_TO_SELF);
types.Remove(USER_CONSENTS); types.Remove(USER_CONSENTS);
types.Remove(USER_EVENTS); types.Remove(USER_EVENTS);
} }
......
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