summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-14 20:44:08 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-14 20:44:08 +0000
commit40b557585ef701b616cb4d9858f260468972cc79 (patch)
tree4ca9add1ed77100c8623ce4202079ccd5e9042bb
parentbfb4d6721cbf094b286e36f69bf43aa14d69de9c (diff)
downloadchromium_src-40b557585ef701b616cb4d9858f260468972cc79.zip
chromium_src-40b557585ef701b616cb4d9858f260468972cc79.tar.gz
chromium_src-40b557585ef701b616cb4d9858f260468972cc79.tar.bz2
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
-rw-r--r--chrome/app/generated_resources.grd8
-rw-r--r--chrome/browser/resources/sync_setup_overlay.html4
-rw-r--r--chrome/browser/resources/sync_setup_overlay.js10
-rw-r--r--chrome/browser/sync/glue/model_association_manager.cc1
-rw-r--r--chrome/browser/sync/profile_sync_components_factory_impl.cc6
-rw-r--r--chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc1
-rw-r--r--chrome/browser/sync/profile_sync_service.cc9
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc17
-rw-r--r--chrome/browser/sync/sync_prefs.cc21
-rw-r--r--chrome/browser/sync/sync_prefs_unittest.cc15
-rw-r--r--chrome/browser/sync/test/integration/enable_disable_test.cc26
-rw-r--r--chrome/browser/sync/user_selectable_sync_type.h4
-rw-r--r--chrome/browser/ui/webui/ntp/foreign_session_handler.cc2
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.cc4
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler_unittest.cc8
-rw-r--r--chrome/common/pref_names.cc1
-rw-r--r--chrome/common/pref_names.h1
-rw-r--r--sync/internal_api/public/base/model_type.h22
-rw-r--r--sync/protocol/proto_value_conversions.cc2
-rw-r--r--sync/protocol/proto_value_conversions_unittest.cc5
-rw-r--r--sync/protocol/sync.proto7
-rw-r--r--sync/syncable/model_type.cc8
-rw-r--r--sync/util/data_type_histogram.h3
23 files changed, 44 insertions, 141 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 01180b8..859b1be 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6574,10 +6574,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
</if>
<if expr="not pp_ifdef('android')">
<message name="IDS_FLAGS_SYNC_TYPED_URLS_NAME" desc="Title for the flag to enable syncing the TypedUrl datatype">
- Enable syncing History
+ Enable syncing Omnibox History
</message>
<message name="IDS_FLAGS_SYNC_TYPED_URLS_DESCRIPTION" desc="Description for the flag to enable syncing the TypedURL datatype">
- Enable History in the sync settings. This allows syncing your typed URL history and navigation history to other clients to assist in omnibox auto-completion and the history UI.
+ Enable Omnibox History in the sync settings. This allows syncing your typed URL history to other clients to assist in omnibox auto-completion.
</message>
</if>
<message name="IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME" desc="Title for the flag for omnibox to use new scoring function in HistoryQuickProvider when ranking suggestions">
@@ -14032,8 +14032,8 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_SYNC_DATATYPE_PASSWORDS" desc="Saved passwords, one of the data types that we allow syncing.">
Passwords
</message>
- <message name="IDS_SYNC_DATATYPE_TYPED_URLS" desc="History, one of the data types that we allow syncing.">
- History
+ <message name="IDS_SYNC_DATATYPE_TYPED_URLS" desc="Typed URLs, one of the data types that we allow syncing.">
+ Omnibox History
</message>
<message name="IDS_SYNC_DATATYPE_APPS" desc="Apps, one of the data types that we allow syncing.">
Apps
diff --git a/chrome/browser/resources/sync_setup_overlay.html b/chrome/browser/resources/sync_setup_overlay.html
index 52ad806..0003d7f 100644
--- a/chrome/browser/resources/sync_setup_overlay.html
+++ b/chrome/browser/resources/sync_setup_overlay.html
@@ -235,9 +235,9 @@
</span>
</label>
</div>
- <div id="tabs-item" class="sync-type-checkbox checkbox">
+ <div id="sessions-item" class="sync-type-checkbox checkbox">
<label>
- <input id="tabs-checkbox" type="checkbox">
+ <input id="sessions-checkbox" type="checkbox">
<span i18n-content="openTabs" il8n-values="title:tabs">
</span>
</label>
diff --git a/chrome/browser/resources/sync_setup_overlay.js b/chrome/browser/resources/sync_setup_overlay.js
index bf05b20..57957d0 100644
--- a/chrome/browser/resources/sync_setup_overlay.js
+++ b/chrome/browser/resources/sync_setup_overlay.js
@@ -269,7 +269,7 @@ cr.define('options', function() {
'extensionsSynced': syncAll || $('extensions-checkbox').checked,
'typedUrlsSynced': syncAll || $('typed-urls-checkbox').checked,
'appsSynced': syncAll || $('apps-checkbox').checked,
- 'tabsSynced': syncAll || $('tabs-checkbox').checked,
+ 'sessionsSynced': syncAll || $('sessions-checkbox').checked,
'encryptAllData': encryptAllData,
'usePassphrase': usePassphrase,
'isGooglePassphrase': googlePassphrase,
@@ -370,11 +370,11 @@ cr.define('options', function() {
} else {
$('apps-item').hidden = true;
}
- if (args.tabsRegistered) {
- $('tabs-checkbox').checked = args.tabsSynced;
- $('tabs-item').hidden = false;
+ if (args.sessionsRegistered) {
+ $('sessions-checkbox').checked = args.sessionsSynced;
+ $('sessions-item').hidden = false;
} else {
- $('tabs-item').hidden = true;
+ $('sessions-item').hidden = true;
}
this.setCheckboxesToKeepEverythingSynced_(args.syncAllDataTypes);
diff --git a/chrome/browser/sync/glue/model_association_manager.cc b/chrome/browser/sync/glue/model_association_manager.cc
index 4dabe05..e748829 100644
--- a/chrome/browser/sync/glue/model_association_manager.cc
+++ b/chrome/browser/sync/glue/model_association_manager.cc
@@ -28,7 +28,6 @@ static const syncer::ModelType kStartOrder[] = {
syncer::NIGORI, // Listed for completeness.
syncer::DEVICE_INFO, // Listed for completeness.
syncer::EXPERIMENTS, // Listed for completeness.
- syncer::PROXY_TABS, // Listed for completeness.
syncer::BOOKMARKS, // UI thread datatypes.
syncer::PREFERENCES,
syncer::PRIORITY_PREFERENCES,
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index 756f18d..0fe3a29 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -39,7 +39,6 @@
#include "chrome/browser/sync/glue/password_change_processor.h"
#include "chrome/browser/sync/glue/password_data_type_controller.h"
#include "chrome/browser/sync/glue/password_model_associator.h"
-#include "chrome/browser/sync/glue/proxy_data_type_controller.h"
#include "chrome/browser/sync/glue/search_engine_data_type_controller.h"
#include "chrome/browser/sync/glue/session_change_processor.h"
#include "chrome/browser/sync/glue/session_data_type_controller.h"
@@ -72,7 +71,6 @@ using browser_sync::BookmarkChangeProcessor;
using browser_sync::BookmarkDataTypeController;
using browser_sync::BookmarkModelAssociator;
using browser_sync::DataTypeController;
-using browser_sync::DataTypeErrorHandler;
using browser_sync::DataTypeManager;
using browser_sync::DataTypeManagerImpl;
using browser_sync::DataTypeManagerObserver;
@@ -82,7 +80,6 @@ using browser_sync::GenericChangeProcessor;
using browser_sync::PasswordChangeProcessor;
using browser_sync::PasswordDataTypeController;
using browser_sync::PasswordModelAssociator;
-using browser_sync::ProxyDataTypeController;
using browser_sync::SearchEngineDataTypeController;
using browser_sync::SessionChangeProcessor;
using browser_sync::SessionDataTypeController;
@@ -94,6 +91,7 @@ using browser_sync::TypedUrlChangeProcessor;
using browser_sync::TypedUrlDataTypeController;
using browser_sync::TypedUrlModelAssociator;
using browser_sync::UIDataTypeController;
+using browser_sync::DataTypeErrorHandler;
using content::BrowserThread;
ProfileSyncComponentsFactoryImpl::ProfileSyncComponentsFactoryImpl(
@@ -151,8 +149,6 @@ void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
// Session sync is enabled by default. Register unless explicitly disabled.
if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) {
pss->RegisterDataTypeController(
- new ProxyDataTypeController(syncer::PROXY_TABS));
- pss->RegisterDataTypeController(
new SessionDataTypeController(this, profile_, pss));
}
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
index c704437..311299c 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
@@ -48,7 +48,6 @@ class ProfileSyncComponentsFactoryImplTest : public testing::Test {
datatypes.push_back(syncer::PREFERENCES);
datatypes.push_back(syncer::SEARCH_ENGINES);
datatypes.push_back(syncer::SESSIONS);
- datatypes.push_back(syncer::PROXY_TABS);
datatypes.push_back(syncer::THEMES);
datatypes.push_back(syncer::TYPED_URLS);
return datatypes;
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 2e454e5..b649c14 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1333,7 +1333,7 @@ void ProfileSyncService::UpdateSelectedTypesHistogram(
syncer::EXTENSIONS,
syncer::PASSWORDS,
syncer::PREFERENCES,
- syncer::PROXY_TABS,
+ syncer::SESSIONS,
syncer::SYNCED_NOTIFICATIONS,
syncer::THEMES,
syncer::TYPED_URLS
@@ -1347,13 +1347,13 @@ void ProfileSyncService::UpdateSelectedTypesHistogram(
browser_sync::user_selectable_type::EXTENSIONS,
browser_sync::user_selectable_type::PASSWORDS,
browser_sync::user_selectable_type::PREFERENCES,
- browser_sync::user_selectable_type::PROXY_TABS,
+ browser_sync::user_selectable_type::SESSIONS,
browser_sync::user_selectable_type::SYNCED_NOTIFICATIONS,
browser_sync::user_selectable_type::THEMES,
browser_sync::user_selectable_type::TYPED_URLS
};
- COMPILE_ASSERT(24 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
+ COMPILE_ASSERT(23 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
COMPILE_ASSERT(arraysize(model_types) ==
browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT,
UpdateCustomConfigHistogram);
@@ -1393,8 +1393,7 @@ void ProfileSyncService::RefreshSpareBootstrapToken(
}
#endif
-void ProfileSyncService::OnUserChoseDatatypes(
- bool sync_everything,
+void ProfileSyncService::OnUserChoseDatatypes(bool sync_everything,
syncer::ModelTypeSet chosen_types) {
if (!backend_.get() && !HasUnrecoverableError()) {
NOTREACHED();
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index eb4a4c4..7b5d337 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -32,8 +32,6 @@
using syncer::sessions::SyncSessionSnapshot;
-namespace {
-
// TODO(rsimha): Remove the following lines once crbug.com/91863 is fixed.
// The amount of time for which we wait for a live sync operation to complete.
static const int kLiveSyncOperationTimeoutMs = 45000;
@@ -41,20 +39,6 @@ static const int kLiveSyncOperationTimeoutMs = 45000;
// The amount of time we wait for test cases that verify exponential backoff.
static const int kExponentialBackoffVerificationTimeoutMs = 60000;
-syncer::ModelTypeSet GetUserVisibleTypes() {
- syncer::ModelTypeSet user_visible_types(syncer::UserTypes());
- user_visible_types.Remove(syncer::APP_NOTIFICATIONS);
- user_visible_types.Remove(syncer::APP_SETTINGS);
- user_visible_types.Remove(syncer::AUTOFILL_PROFILE);
- 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;
-}
-
-}
-
// Simple class to implement a timeout using PostDelayedTask. If it is not
// aborted before picked up by a message queue, then it asserts with the message
// provided. This class is not thread safe.
@@ -964,7 +948,6 @@ bool ProfileSyncServiceHarness::DisableSyncForDatatype(
return true;
}
- synced_datatypes.RetainAll(GetUserVisibleTypes());
synced_datatypes.Remove(datatype);
service()->OnUserChoseDatatypes(false, synced_datatypes);
if (AwaitFullSyncCompletion("Datatype reconfiguration.")) {
diff --git a/chrome/browser/sync/sync_prefs.cc b/chrome/browser/sync/sync_prefs.cc
index d4b488c..9c53203 100644
--- a/chrome/browser/sync/sync_prefs.cc
+++ b/chrome/browser/sync/sync_prefs.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/sync/sync_prefs.h"
-#include "base/command_line.h"
#include "base/logging.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/public/pref_member.h"
@@ -15,7 +14,6 @@
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
@@ -326,8 +324,6 @@ const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) {
return prefs::kSyncSyncedNotifications;
case syncer::DICTIONARY:
return prefs::kSyncDictionary;
- case syncer::PROXY_TABS:
- return prefs::kSyncTabs;
default:
break;
}
@@ -395,12 +391,8 @@ void SyncPrefs::RegisterPrefGroups() {
pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY);
pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES);
- pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES);
-
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kHistoryEnableFullHistorySync))
- pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS);
- pref_groups_[syncer::PROXY_TABS].Put(syncer::SESSIONS);
+ // TODO(akalin): Revisit this once UI lands.
+ pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES);
}
// static
@@ -426,13 +418,6 @@ bool SyncPrefs::GetDataTypePreferred(syncer::ModelType type) const {
NOTREACHED();
return false;
}
- if (type == syncer::PROXY_TABS &&
- pref_service_->GetUserPrefValue(pref_name) == NULL &&
- pref_service_->IsUserModifiablePreference(pref_name)) {
- // If there is no tab sync preference yet (i.e. newly enabled type),
- // default to the session sync preference value.
- pref_name = GetPrefNameForDataType(syncer::SESSIONS);
- }
return pref_service_->GetBoolean(pref_name);
}
@@ -458,6 +443,8 @@ syncer::ModelTypeSet SyncPrefs::ResolvePrefGroups(
i != pref_groups_.end(); ++i) {
if (types.Has(i->first))
types_with_groups.PutAll(i->second);
+ else
+ types_with_groups.RemoveAll(i->second);
}
types_with_groups.RetainAll(registered_types);
return types_with_groups;
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(
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc
index 38ba937..0915056 100644
--- a/chrome/browser/sync/test/integration/enable_disable_test.cc
+++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -57,25 +57,17 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, EnableOneAtATime) {
ASSERT_TRUE(GetClient(0)->EnableSyncForDatatype(it.Get()));
// AUTOFILL_PROFILE is lumped together with AUTOFILL.
- // SESSIONS is lumped together with PROXY_TABS and
- // HISTORY_DELETE_DIRECTIVES.
- if (it.Get() == syncer::AUTOFILL_PROFILE || it.Get() == syncer::SESSIONS) {
+ if (it.Get() == syncer::AUTOFILL_PROFILE) {
continue;
}
- if (!syncer::ProxyTypes().Has(it.Get())) {
- ASSERT_TRUE(DoesTopLevelNodeExist(user_share, it.Get()))
- << syncer::ModelTypeToString(it.Get());
- }
+ ASSERT_TRUE(DoesTopLevelNodeExist(user_share, it.Get()))
+ << syncer::ModelTypeToString(it.Get());
// AUTOFILL_PROFILE is lumped together with AUTOFILL.
if (it.Get() == syncer::AUTOFILL) {
ASSERT_TRUE(DoesTopLevelNodeExist(user_share,
syncer::AUTOFILL_PROFILE));
- } else if (it.Get() == syncer::HISTORY_DELETE_DIRECTIVES ||
- it.Get() == syncer::PROXY_TABS) {
- ASSERT_TRUE(DoesTopLevelNodeExist(user_share,
- syncer::SESSIONS));
}
}
@@ -101,9 +93,7 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, DisableOneAtATime) {
// Make sure all top-level nodes exist first.
for (syncer::ModelTypeSet::Iterator it = registered_types.First();
it.Good(); it.Inc()) {
- if (!syncer::ProxyTypes().Has(it.Get())) {
- ASSERT_TRUE(DoesTopLevelNodeExist(user_share, it.Get()));
- }
+ ASSERT_TRUE(DoesTopLevelNodeExist(user_share, it.Get()));
}
for (syncer::ModelTypeSet::Iterator it = registered_types.First();
@@ -111,9 +101,7 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, DisableOneAtATime) {
ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(it.Get()));
// AUTOFILL_PROFILE is lumped together with AUTOFILL.
- // SESSIONS is lumped together with PROXY_TABS and
- // HISTORY_DELETE_DIRECTIVES.
- if (it.Get() == syncer::AUTOFILL_PROFILE || it.Get() == syncer::SESSIONS) {
+ if (it.Get() == syncer::AUTOFILL_PROFILE) {
continue;
}
@@ -127,10 +115,6 @@ IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, DisableOneAtATime) {
if (it.Get() == syncer::AUTOFILL) {
ASSERT_FALSE(DoesTopLevelNodeExist(user_share,
syncer::AUTOFILL_PROFILE));
- } else if (it.Get() == syncer::HISTORY_DELETE_DIRECTIVES ||
- it.Get() == syncer::PROXY_TABS) {
- ASSERT_FALSE(DoesTopLevelNodeExist(user_share,
- syncer::SESSIONS));
}
}
diff --git a/chrome/browser/sync/user_selectable_sync_type.h b/chrome/browser/sync/user_selectable_sync_type.h
index 56440a6..143aa77 100644
--- a/chrome/browser/sync/user_selectable_sync_type.h
+++ b/chrome/browser/sync/user_selectable_sync_type.h
@@ -29,7 +29,7 @@ enum UserSelectableSyncType {
THEMES = 4,
TYPED_URLS = 5,
EXTENSIONS = 6,
- PROXY_TABS = 7,
+ SESSIONS = 7,
APPS = 8,
SYNCED_NOTIFICATIONS = 9,
@@ -46,8 +46,6 @@ enum UserSelectableSyncType {
// DEVICE_INFO,
// EXPERIMENTS,
// PRIORITY_PREFERENCES,
- // SESSIONS,
- // HISTORY_DELETE_DIRECTIVES,
// Number of sync datatypes exposed to the user via checboxes in the UI.
SELECTABLE_DATATYPE_COUNT = 10,
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
index 0515759..d924246 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
@@ -222,7 +222,7 @@ bool ForeignSessionHandler::IsTabSyncEnabled() {
Profile* profile = Profile::FromWebUI(web_ui());
ProfileSyncService* service =
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
- return service && service->GetPreferredDataTypes().Has(syncer::PROXY_TABS);
+ return service && service->GetPreferredDataTypes().Has(syncer::SESSIONS);
}
string16 ForeignSessionHandler::FormatSessionTime(const base::Time& time) {
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 3ef6f06..8e2bf6d 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -78,7 +78,7 @@ const char* kDataTypeNames[] = {
"extensions",
"passwords",
"preferences",
- "tabs",
+ "sessions",
"themes",
"typedUrls"
};
@@ -90,7 +90,7 @@ const syncer::ModelType kDataTypes[] = {
syncer::EXTENSIONS,
syncer::PASSWORDS,
syncer::PREFERENCES,
- syncer::PROXY_TABS,
+ syncer::SESSIONS,
syncer::THEMES,
syncer::TYPED_URLS
};
diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
index e152822..abea6a3 100644
--- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
@@ -56,7 +56,7 @@ const syncer::ModelType kUserSelectableTypes[] = {
syncer::EXTENSIONS,
syncer::PASSWORDS,
syncer::PREFERENCES,
- syncer::PROXY_TABS,
+ syncer::SESSIONS,
syncer::THEMES,
syncer::TYPED_URLS
};
@@ -102,7 +102,7 @@ std::string GetConfiguration(const DictionaryValue* extra_values,
result.SetBoolean("extensionsSynced", types.Has(syncer::EXTENSIONS));
result.SetBoolean("passwordsSynced", types.Has(syncer::PASSWORDS));
result.SetBoolean("preferencesSynced", types.Has(syncer::PREFERENCES));
- result.SetBoolean("tabsSynced", types.Has(syncer::PROXY_TABS));
+ result.SetBoolean("sessionsSynced", types.Has(syncer::SESSIONS));
result.SetBoolean("themesSynced", types.Has(syncer::THEMES));
result.SetBoolean("typedUrlsSynced", types.Has(syncer::TYPED_URLS));
std::string args;
@@ -201,7 +201,7 @@ void CheckConfigDataTypeArguments(DictionaryValue* dictionary,
CheckBool(dictionary, "extensionsSynced", types.Has(syncer::EXTENSIONS));
CheckBool(dictionary, "passwordsSynced", types.Has(syncer::PASSWORDS));
CheckBool(dictionary, "preferencesSynced", types.Has(syncer::PREFERENCES));
- CheckBool(dictionary, "tabsSynced", types.Has(syncer::PROXY_TABS));
+ CheckBool(dictionary, "sessionsSynced", types.Has(syncer::SESSIONS));
CheckBool(dictionary, "themesSynced", types.Has(syncer::THEMES));
CheckBool(dictionary, "typedUrlsSynced", types.Has(syncer::TYPED_URLS));
}
@@ -1120,7 +1120,7 @@ TEST_P(SyncSetupHandlerTest, ShowSetupSyncEverything) {
CheckBool(dictionary, "extensionsRegistered", true);
CheckBool(dictionary, "passwordsRegistered", true);
CheckBool(dictionary, "preferencesRegistered", true);
- CheckBool(dictionary, "tabsRegistered", true);
+ CheckBool(dictionary, "sessionsRegistered", true);
CheckBool(dictionary, "themesRegistered", true);
CheckBool(dictionary, "typedUrlsRegistered", true);
CheckBool(dictionary, "showPassphrase", false);
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index d881ec2..12a9a13 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1739,7 +1739,6 @@ const char kSyncSessions[] = "sync.sessions";
const char kSyncHistoryDeleteDirectives[] = "sync.history_delete_directives";
const char kSyncSyncedNotifications[] = "sync.synced_notifications";
const char kSyncDictionary[] = "sync.dictionary";
-const char kSyncTabs[] = "sync.tabs";
// Boolean used by enterprise configuration management in order to lock down
// sync.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index e269b9c..8f26c1b 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -618,7 +618,6 @@ extern const char kSyncSearchEngines[];
extern const char kSyncSessions[];
extern const char kSyncSuppressStart[];
extern const char kSyncSyncedNotifications[];
-extern const char kSyncTabs[];
extern const char kGoogleServicesLastUsername[];
extern const char kGoogleServicesUsername[];
extern const char kGoogleServicesUsernamePattern[];
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h
index 882c821..8eaf5d0 100644
--- a/sync/internal_api/public/base/model_type.h
+++ b/sync/internal_api/public/base/model_type.h
@@ -49,11 +49,6 @@ enum ModelType {
// can be represented in the protocol using a specific Message type in the
// EntitySpecifics protocol buffer.
//
- // WARNING: Modifying the order of these types or inserting a new type above
- // these will affect numerous histograms that rely on the enum values being
- // consistent. When adding a new type, add it to the end of the user model
- // types section, but before the proxy types.
- //
// A bookmark folder or a bookmark URL object.
BOOKMARKS,
FIRST_USER_MODEL_TYPE = BOOKMARKS, // Declared 2nd, for debugger prettiness.
@@ -67,6 +62,7 @@ enum ModelType {
AUTOFILL_PROFILE,
// An autofill folder or an autofill object.
AUTOFILL,
+
// A themes folder or a themes object.
THEMES,
// A typed_url folder or a typed_url object.
@@ -91,22 +87,8 @@ enum ModelType {
SYNCED_NOTIFICATIONS,
// Custom spelling dictionary.
DICTIONARY,
+ LAST_USER_MODEL_TYPE = DICTIONARY,
- // ---- Proxy types ----
- // Proxy types are excluded from the sync protocol, but are still considered
- // real user types. By convention, we prefix them with 'PROXY_' to distinguish
- // them from normal protocol types.
-
- // Tab sync. This is a placeholder type, so that Sessions can be implicitly
- // enabled for history sync and tabs sync.
- PROXY_TABS,
-
- FIRST_PROXY_TYPE = PROXY_TABS,
- LAST_PROXY_TYPE = PROXY_TABS,
-
- LAST_USER_MODEL_TYPE = PROXY_TABS,
-
- // ---- Control Types ----
// An object representing a set of Nigori keys.
NIGORI,
FIRST_CONTROL_MODEL_TYPE = NIGORI,
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index ee5580e..886d55a 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -581,7 +581,6 @@ DictionaryValue* GetUpdatesMessageToValue(
SET_INT32(batch_size);
SET_REP(from_progress_marker, DataTypeProgressMarkerToValue);
SET_BOOL(streaming);
- SET_BOOL(need_encryption_key);
SET_BOOL(create_mobile_bookmarks_folder);
return value;
}
@@ -739,7 +738,6 @@ base::DictionaryValue* ClientConfigParamsToValue(
const sync_pb::ClientConfigParams& proto) {
DictionaryValue* value = new DictionaryValue();
SET_INT32_REP(enabled_type_ids);
- SET_BOOL(tabs_datatype_enabled);
return value;
}
diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
index 8ed5440..74ae4f2 100644
--- a/sync/protocol/proto_value_conversions_unittest.cc
+++ b/sync/protocol/proto_value_conversions_unittest.cc
@@ -50,7 +50,7 @@ TEST_F(ProtoValueConversionsTest, ProtoChangeCheck) {
// If this number changes, that means we added or removed a data
// type. Don't forget to add a unit test for {New
// type}SpecificsToValue below.
- EXPECT_EQ(24, MODEL_TYPE_COUNT);
+ EXPECT_EQ(23, MODEL_TYPE_COUNT);
// We'd also like to check if we changed any field in our messages.
// However, that's hard to do: sizeof could work, but it's
@@ -232,8 +232,7 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
#undef SET_FIELD
scoped_ptr<DictionaryValue> value(EntitySpecificsToValue(specifics));
- EXPECT_EQ(MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE -
- (LAST_PROXY_TYPE - FIRST_PROXY_TYPE + 1),
+ EXPECT_EQ(MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE,
static_cast<int>(value->size()));
}
diff --git a/sync/protocol/sync.proto b/sync/protocol/sync.proto
index a74089e..44dd5908 100644
--- a/sync/protocol/sync.proto
+++ b/sync/protocol/sync.proto
@@ -366,13 +366,8 @@ message ChromiumExtensionsActivity {
// Client specific configuration information.
message ClientConfigParams {
- // The set of data types this client has enabled. Note that this does not
- // include proxy types, as they do not have protocol field numbers and are
- // placeholder types that implicitly enable protocol types.
+ // The set of data types this client has enabled.
repeated int32 enabled_type_ids = 1;
-
- // Whether the PROXY_TABS proxy datatype is enabled on this client.
- optional bool tabs_datatype_enabled = 2;
};
message CommitMessage {
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 2bdb7cb..0847810 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -341,7 +341,7 @@ ModelTypeSet ControlTypes() {
ModelTypeSet ProxyTypes() {
ModelTypeSet set;
- set.Put(PROXY_TABS);
+ // TODO(zea): add a TABS type here.
return set;
}
@@ -400,8 +400,6 @@ const char* ModelTypeToString(ModelType model_type) {
return "Priority Preferences";
case DICTIONARY:
return "Dictionary";
- case PROXY_TABS:
- return "Tabs";
default:
break;
}
@@ -479,8 +477,6 @@ ModelType ModelTypeFromString(const std::string& model_type_string) {
return PRIORITY_PREFERENCES;
else if (model_type_string == "Dictionary")
return DICTIONARY;
- else if (model_type_string == "Tabs")
- return PROXY_TABS;
else
NOTREACHED() << "No known model type corresponding to "
<< model_type_string << ".";
@@ -563,8 +559,6 @@ std::string ModelTypeToRootTag(ModelType type) {
return "google_chrome_priority_preferences";
case DICTIONARY:
return "google_chrome_dictionary";
- case PROXY_TABS:
- return std::string();
default:
break;
}
diff --git a/sync/util/data_type_histogram.h b/sync/util/data_type_histogram.h
index 75e833e..e72cebb 100644
--- a/sync/util/data_type_histogram.h
+++ b/sync/util/data_type_histogram.h
@@ -99,9 +99,6 @@
case ::syncer::DICTIONARY: \
PER_DATA_TYPE_MACRO("Dictionary"); \
break; \
- case ::syncer::PROXY_TABS :\
- PER_DATA_TYPE_MACRO("Tabs"); \
- break; \
default: \
NOTREACHED() << "Unknown datatype " \
<< ::syncer::ModelTypeToString(datatype); \