| Index: chrome/browser/sync/test/integration/sync_app_helper.cc
|
| diff --git a/chrome/browser/sync/test/integration/sync_app_helper.cc b/chrome/browser/sync/test/integration/sync_app_helper.cc
|
| index 9ab1875a958d87a1199312d951c104a427e0f593..a2864beef3c6d3efe2e8b8604527414876c126d9 100644
|
| --- a/chrome/browser/sync/test/integration/sync_app_helper.cc
|
| +++ b/chrome/browser/sync/test/integration/sync_app_helper.cc
|
| @@ -17,6 +17,7 @@ namespace {
|
| struct AppState {
|
| AppState();
|
| ~AppState();
|
| + bool IsValid() const;
|
| bool Equals(const AppState& other) const;
|
|
|
| StringOrdinal app_launch_ordinal;
|
| @@ -29,6 +30,10 @@ AppState::AppState() {}
|
|
|
| AppState::~AppState() {}
|
|
|
| +bool AppState::IsValid() const {
|
| + return page_ordinal.IsValid() && app_launch_ordinal.IsValid();
|
| +}
|
| +
|
| bool AppState::Equals(const AppState& other) const {
|
| return app_launch_ordinal.Equal(other.app_launch_ordinal) &&
|
| page_ordinal.Equal(other.page_ordinal);
|
| @@ -112,6 +117,14 @@ bool SyncAppHelper::AppStatesMatch(Profile* profile1, Profile* profile2) {
|
| DVLOG(2) << "Apps for profile " << profile1->GetDebugName()
|
| << " do not match profile " << profile2->GetDebugName();
|
| return false;
|
| + } else if (!it1->second.IsValid()) {
|
| + DVLOG(2) << "Apps for profile " << profile1->GetDebugName()
|
| + << " are not valid.";
|
| + return false;
|
| + } else if (!it2->second.IsValid()) {
|
| + DVLOG(2) << "Apps for profile " << profile2->GetDebugName()
|
| + << " are not valid.";
|
| + return false;
|
| } else if (!it1->second.Equals(it2->second)) {
|
| DVLOG(2) << "App states for profile " << profile1->GetDebugName()
|
| << " do not match profile " << profile2->GetDebugName();
|
|
|