Commit a54a0500 authored by melandory's avatar melandory Committed by Commit bot

Don't sync session.startup_urls to mobile platforms.

Chrome will start sync prefs to mobile. It's not desired behaviour for
the session.startup_urls and the session.urls_to_restore_on_startup prefs.

BUG=622620

Review-Url: https://codereview.chromium.org/2114923002
Cr-Commit-Position: refs/heads/master@{#403436}
parent b79f6304
......@@ -44,12 +44,15 @@ void URLListToPref(const base::ListValue* url_list, SessionStartupPref* pref) {
// static
void SessionStartupPref::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterIntegerPref(
prefs::kRestoreOnStartup,
TypeToPrefValue(GetDefaultStartupType()),
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterListPref(prefs::kURLsToRestoreOnStartup,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
#if defined(OS_IOS) || defined(OS_ANDROID)
uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS;
#else
uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
#endif
registry->RegisterIntegerPref(prefs::kRestoreOnStartup,
TypeToPrefValue(GetDefaultStartupType()),
flags);
registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, flags);
}
// static
......
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