| Index: chrome/browser/sync/test/integration/sessions_helper.cc
|
| diff --git a/chrome/browser/sync/test/integration/sessions_helper.cc b/chrome/browser/sync/test/integration/sessions_helper.cc
|
| index 72e440f5595cd78f86a4c1b84684770cc794f363..e71cfcf11682ba7cf2ef2d6ee2f19a30753e0214 100644
|
| --- a/chrome/browser/sync/test/integration/sessions_helper.cc
|
| +++ b/chrome/browser/sync/test/integration/sessions_helper.cc
|
| @@ -22,7 +22,6 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/sync/profile_sync_service_factory.h"
|
| #include "chrome/browser/sync/sessions/notification_service_sessions_router.h"
|
| -#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
|
| #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
|
| #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
|
| #include "chrome/browser/sync/test/integration/sync_test.h"
|
| @@ -379,53 +378,27 @@ bool CheckForeignSessionsAgainst(
|
| return true;
|
| }
|
|
|
| -namespace {
|
| -
|
| -// Helper class used in the implementation of AwaitCheckForeignSessionsAgainst.
|
| -class CheckForeignSessionsChecker : public MultiClientStatusChangeChecker {
|
| - public:
|
| - CheckForeignSessionsChecker(int index,
|
| - const std::vector<ScopedWindowMap>& windows);
|
| - ~CheckForeignSessionsChecker() override;
|
| -
|
| - bool IsExitConditionSatisfied() override;
|
| - std::string GetDebugMessage() const override;
|
| +void DeleteForeignSession(int index, std::string session_tag) {
|
| + ProfileSyncServiceFactory::GetInstance()
|
| + ->GetForProfile(test()->GetProfile(index))
|
| + ->GetOpenTabsUIDelegate()
|
| + ->DeleteForeignSession(session_tag);
|
| +}
|
|
|
| - private:
|
| - int index_;
|
| - const std::vector<ScopedWindowMap>& windows_;
|
| -};
|
| +} // namespace sessions_helper
|
|
|
| -CheckForeignSessionsChecker::CheckForeignSessionsChecker(
|
| - int index, const std::vector<ScopedWindowMap>& windows)
|
| +ForeignSessionsMatchChecker::ForeignSessionsMatchChecker(
|
| + int index,
|
| + const std::vector<sessions_helper::ScopedWindowMap>& windows)
|
| : MultiClientStatusChangeChecker(
|
| - sync_datatype_helper::test()->GetSyncServices()),
|
| + sync_datatype_helper::test()->GetSyncServices()),
|
| index_(index),
|
| windows_(windows) {}
|
|
|
| -CheckForeignSessionsChecker::~CheckForeignSessionsChecker() {}
|
| -
|
| -bool CheckForeignSessionsChecker::IsExitConditionSatisfied() {
|
| - return CheckForeignSessionsAgainst(index_, windows_);
|
| +bool ForeignSessionsMatchChecker::IsExitConditionSatisfied() {
|
| + return sessions_helper::CheckForeignSessionsAgainst(index_, windows_);
|
| }
|
|
|
| -std::string CheckForeignSessionsChecker::GetDebugMessage() const {
|
| +std::string ForeignSessionsMatchChecker::GetDebugMessage() const {
|
| return "Waiting for matching foreign sessions";
|
| }
|
| -
|
| -} // namespace
|
| -
|
| -bool AwaitCheckForeignSessionsAgainst(
|
| - int index, const std::vector<ScopedWindowMap>& windows) {
|
| - CheckForeignSessionsChecker checker(index, windows);
|
| - checker.Wait();
|
| - return !checker.TimedOut();
|
| -}
|
| -
|
| -void DeleteForeignSession(int index, std::string session_tag) {
|
| - ProfileSyncServiceFactory::GetInstance()->GetForProfile(
|
| - test()->GetProfile(index))->
|
| - GetOpenTabsUIDelegate()->DeleteForeignSession(session_tag);
|
| -}
|
| -
|
| -} // namespace sessions_helper
|
|
|