From 40b557585ef701b616cb4d9858f260468972cc79 Mon Sep 17 00:00:00 2001 From: "isherman@chromium.org" Date: Thu, 14 Feb 2013 20:44:08 +0000 Subject: Revert 182527 Caused compile failure on Win Aura > [Sync] Make SESSIONS an implicit type > > We add TABS as a new local type, which is now what is enabled via the user > settings. It implicitly enables SESSIONS. > > Similarly, History now corresponds with Typed URLs, which implicitly enables > history delete directives if the proper command line flag is passed. > > Finally, History delete directives implicitly enables SESSIONS, which we can do > because Sessions is no longer a user selectable type. > > BUG=170162 > TBR=jhawkins@chromium.org > > Review URL: https://chromiumcodereview.appspot.com/11961030 TBR=zea@chromium.org Review URL: https://codereview.chromium.org/12271002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182529 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sync/sync_prefs_unittest.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'chrome/browser/sync/sync_prefs_unittest.cc') diff --git a/chrome/browser/sync/sync_prefs_unittest.cc b/chrome/browser/sync/sync_prefs_unittest.cc index 9311ec8..d963bab 100644 --- a/chrome/browser/sync/sync_prefs_unittest.cc +++ b/chrome/browser/sync/sync_prefs_unittest.cc @@ -4,10 +4,8 @@ #include "chrome/browser/sync/sync_prefs.h" -#include "base/command_line.h" #include "base/message_loop.h" #include "base/time.h" -#include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_pref_service_syncable.h" #include "sync/internal_api/public/base/model_type.h" #include "testing/gmock/include/gmock/gmock.h" @@ -23,8 +21,6 @@ using ::testing::StrictMock; class SyncPrefsTest : public testing::Test { protected: virtual void SetUp() OVERRIDE { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kHistoryEnableFullHistorySync); SyncPrefs::RegisterUserPrefs(&pref_service_, pref_service_.registry()); } @@ -44,8 +40,6 @@ syncer::ModelTypeSet GetUserVisibleTypes() { user_visible_types.Remove(syncer::DICTIONARY); user_visible_types.Remove(syncer::EXTENSION_SETTINGS); user_visible_types.Remove(syncer::SEARCH_ENGINES); - user_visible_types.Remove(syncer::SESSIONS); - user_visible_types.Remove(syncer::HISTORY_DELETE_DIRECTIVES); return user_visible_types; } @@ -125,12 +119,13 @@ TEST_F(SyncPrefsTest, PreferredTypesNotKeepEverythingSynced) { if (it.Get() == syncer::EXTENSIONS) { expected_preferred_types.Put(syncer::EXTENSION_SETTINGS); } - if (it.Get() == syncer::TYPED_URLS) { + if (it.Get() == syncer::SESSIONS) { expected_preferred_types.Put(syncer::HISTORY_DELETE_DIRECTIVES); - expected_preferred_types.Put(syncer::SESSIONS); } - if (it.Get() == syncer::PROXY_TABS) { - expected_preferred_types.Put(syncer::SESSIONS); + // TODO(akalin): Remove this when history delete directives are + // registered by default. + if (it.Get() == syncer::HISTORY_DELETE_DIRECTIVES) { + expected_preferred_types.Clear(); } sync_prefs.SetPreferredDataTypes(user_types, preferred_types); EXPECT_TRUE(expected_preferred_types.Equals( -- cgit v1.1