Commit bd86904b authored by akalin@chromium.org's avatar akalin@chromium.org

[Sync] Remove ModelChangingSyncerCommand::HasCustomGroups()

Now that we've tracked down the root cause for the perf regressions
triggered by custom groups, we can remove this function now.

BUG=97832,107040
TEST=


Review URL: http://codereview.chromium.org/8957001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114696 0039d316-1c4b-4281-b951-d872f2087c98
parent 7a161dbd
......@@ -17,10 +17,6 @@ using sessions::SyncSession;
ApplyUpdatesCommand::ApplyUpdatesCommand() {}
ApplyUpdatesCommand::~ApplyUpdatesCommand() {}
bool ApplyUpdatesCommand::HasCustomGroupsToChange() const {
return true;
}
std::set<ModelSafeGroup> ApplyUpdatesCommand::GetGroupsToChange(
const sessions::SyncSession& session) const {
std::set<ModelSafeGroup> groups_with_unapplied_updates;
......
......@@ -18,7 +18,6 @@ class ApplyUpdatesCommand : public ModelChangingSyncerCommand {
protected:
// ModelChangingSyncerCommand implementation.
virtual bool HasCustomGroupsToChange() const OVERRIDE;
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE;
virtual void ModelChangingExecuteImpl(
......
......@@ -30,10 +30,6 @@ using std::vector;
BuildAndProcessConflictSetsCommand::BuildAndProcessConflictSetsCommand() {}
BuildAndProcessConflictSetsCommand::~BuildAndProcessConflictSetsCommand() {}
bool BuildAndProcessConflictSetsCommand::HasCustomGroupsToChange() const {
return true;
}
std::set<ModelSafeGroup> BuildAndProcessConflictSetsCommand::GetGroupsToChange(
const sessions::SyncSession& session) const {
return session.GetEnabledGroupsWithConflicts();
......
......@@ -37,7 +37,6 @@ class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand {
protected:
// ModelChangingSyncerCommand implementation.
virtual bool HasCustomGroupsToChange() const OVERRIDE;
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE;
virtual void ModelChangingExecuteImpl(
......
......@@ -19,9 +19,7 @@ void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) {
}
const std::set<ModelSafeGroup>& groups_to_change =
HasCustomGroupsToChange() ?
GetGroupsToChange(*work_session_) :
session->GetEnabledGroups();
GetGroupsToChange(*work_session_);
for (size_t i = 0; i < session->workers().size(); ++i) {
ModelSafeWorker* worker = work_session_->workers()[i];
ModelSafeGroup group = worker->GetModelSafeGroup();
......
......@@ -48,15 +48,6 @@ class ModelChangingSyncerCommand : public SyncerCommand {
}
protected:
// Hack to track down which subclass triggers the perf regression.
// (See comments in http://codereview.chromium.org/8637006/ for
// details.) If this returns false (the default),
// GetGroupsToChange() is not used and session.GetEnabledGroups()
// is used instead.
//
// TODO(akalin): Remove this when we track down the perf regression.
virtual bool HasCustomGroupsToChange() const = 0;
// This should return the set of groups in |session| that need to be
// changed. The returned set should be a subset of
// session.GetEnabledGroups(). Subclasses can guarantee this either
......
......@@ -26,10 +26,6 @@ class FakeModelChangingSyncerCommand : public ModelChangingSyncerCommand {
}
protected:
virtual bool HasCustomGroupsToChange() const OVERRIDE {
return false;
}
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE {
return session.GetEnabledGroups();
......
......@@ -60,10 +60,6 @@ void ResetErrorCounters(StatusController* status) {
ProcessCommitResponseCommand::ProcessCommitResponseCommand() {}
ProcessCommitResponseCommand::~ProcessCommitResponseCommand() {}
bool ProcessCommitResponseCommand::HasCustomGroupsToChange() const {
return true;
}
std::set<ModelSafeGroup> ProcessCommitResponseCommand::GetGroupsToChange(
const sessions::SyncSession& session) const {
std::set<ModelSafeGroup> groups_with_commits;
......
......@@ -30,7 +30,6 @@ class ProcessCommitResponseCommand : public ModelChangingSyncerCommand {
protected:
// ModelChangingSyncerCommand implementation.
virtual bool HasCustomGroupsToChange() const OVERRIDE;
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE;
virtual bool ModelNeutralExecuteImpl(
......
......@@ -27,10 +27,6 @@ using sessions::UpdateProgress;
ProcessUpdatesCommand::ProcessUpdatesCommand() {}
ProcessUpdatesCommand::~ProcessUpdatesCommand() {}
bool ProcessUpdatesCommand::HasCustomGroupsToChange() const {
return true;
}
std::set<ModelSafeGroup> ProcessUpdatesCommand::GetGroupsToChange(
const sessions::SyncSession& session) const {
return session.GetEnabledGroupsWithVerifiedUpdates();
......
......@@ -36,7 +36,6 @@ class ProcessUpdatesCommand : public ModelChangingSyncerCommand {
protected:
// ModelChangingSyncerCommand implementation.
virtual bool HasCustomGroupsToChange() const OVERRIDE;
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE;
virtual bool ModelNeutralExecuteImpl(
......
......@@ -14,10 +14,6 @@ namespace browser_sync {
ResolveConflictsCommand::ResolveConflictsCommand() {}
ResolveConflictsCommand::~ResolveConflictsCommand() {}
bool ResolveConflictsCommand::HasCustomGroupsToChange() const {
return true;
}
std::set<ModelSafeGroup> ResolveConflictsCommand::GetGroupsToChange(
const sessions::SyncSession& session) const {
return session.GetEnabledGroupsWithConflicts();
......
......@@ -19,7 +19,6 @@ class ResolveConflictsCommand : public ModelChangingSyncerCommand {
protected:
// ModelChangingSyncerCommand implementation.
virtual bool HasCustomGroupsToChange() const OVERRIDE;
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE;
virtual void ModelChangingExecuteImpl(
......
......@@ -27,10 +27,6 @@ using syncable::SYNCER;
VerifyUpdatesCommand::VerifyUpdatesCommand() {}
VerifyUpdatesCommand::~VerifyUpdatesCommand() {}
bool VerifyUpdatesCommand::HasCustomGroupsToChange() const {
return true;
}
std::set<ModelSafeGroup> VerifyUpdatesCommand::GetGroupsToChange(
const sessions::SyncSession& session) const {
std::set<ModelSafeGroup> groups_with_updates;
......
......@@ -28,7 +28,6 @@ class VerifyUpdatesCommand : public ModelChangingSyncerCommand {
protected:
// ModelChangingSyncerCommand implementation.
virtual bool HasCustomGroupsToChange() const OVERRIDE;
virtual std::set<ModelSafeGroup> GetGroupsToChange(
const sessions::SyncSession& session) const OVERRIDE;
virtual void ModelChangingExecuteImpl(
......
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