Index: chrome/browser/sync/engine/model_changing_syncer_command.h |
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.h b/chrome/browser/sync/engine/model_changing_syncer_command.h |
index 9a2311e96d907365d7f61a6cd519aa431f962cc3..37cb627dae9e9d6de56e3831b82b750d414f0c52 100644 |
--- a/chrome/browser/sync/engine/model_changing_syncer_command.h |
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.h |
@@ -7,6 +7,7 @@ |
#pragma once |
#include "base/compiler_specific.h" |
+#include "chrome/browser/sync/engine/model_safe_worker.h" |
#include "chrome/browser/sync/engine/syncer_command.h" |
#include "chrome/browser/sync/util/unrecoverable_error_info.h" |
@@ -41,6 +42,22 @@ class ModelChangingSyncerCommand : public SyncerCommand { |
return UnrecoverableErrorInfo(); |
} |
+ std::set<ModelSafeGroup> GetGroupsToChangeForTest( |
+ const sessions::SyncSession& session) const { |
+ return GetGroupsToChange(session); |
+ } |
+ |
+ protected: |
+ // 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 |
+ // by calling session.GetEnabledGroups() or |
+ // session.GetEnabledGroupsWithConflicts() and filtering that, or |
+ // using GetGroupForModelType() (which handles top-level/unspecified |
+ // nodes) to project from model types to groups. |
+ virtual std::set<ModelSafeGroup> GetGroupsToChange( |
+ const sessions::SyncSession& session) const = 0; |
+ |
// Sometimes, a command has work to do that needs to touch global state |
// belonging to multiple ModelSafeGroups, but in a way that is known to be |
// safe. This will be called once, prior to ModelChangingExecuteImpl, |