| Index: chrome/browser/sync/test/integration/sync_arc_package_helper.h
|
| diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.h b/chrome/browser/sync/test/integration/sync_arc_package_helper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3c085cc3bbe646ee57bf7db6314530dcbab67f5c
|
| --- /dev/null
|
| +++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.h
|
| @@ -0,0 +1,70 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
|
| +#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
|
| +
|
| +#include <map>
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/singleton.h"
|
| +#include "components/arc/common/app.mojom.h"
|
| +
|
| +class Profile;
|
| +class SyncTest;
|
| +
|
| +namespace chromeos {
|
| +class ScopedUserManagerEnabler;
|
| +}
|
| +
|
| +namespace arc {
|
| +
|
| +class SyncArcPackageHelper {
|
| + public:
|
| + static SyncArcPackageHelper* GetInstance();
|
| +
|
| + void SetupTest(SyncTest* test);
|
| +
|
| + void CleanUp();
|
| +
|
| + void InstallPackageWithIndex(Profile* profile, size_t id);
|
| +
|
| + void UninstallPackageWithIndex(Profile* profile, size_t id);
|
| +
|
| + void ClearPackages(Profile* profile);
|
| +
|
| + bool AllProfilesHaveSamePackages();
|
| +
|
| + bool AllProfilesHaveSamePackageDetails();
|
| +
|
| + void SetupArcService(Profile* profile, size_t id);
|
| +
|
| + private:
|
| + friend struct base::DefaultSingletonTraits<SyncArcPackageHelper>;
|
| +
|
| + SyncArcPackageHelper();
|
| + ~SyncArcPackageHelper();
|
| +
|
| + void InstallPackage(Profile* profile, const mojom::ArcPackageInfo& package);
|
| +
|
| + void UninstallPackage(Profile* profile, const std::string& package_name);
|
| +
|
| + // Returns true if |profile1| has the same arc packages as |profile2|.
|
| + bool ArcPackagesMatch(Profile* profile1, Profile* profile2);
|
| +
|
| + // Returns true if |profile1| has the same arc packages and detail package
|
| + // informaton as |profile2|.
|
| + bool ArcPackageDetailsMatch(Profile* profile1, Profile* profile2);
|
| +
|
| + SyncTest* test_;
|
| + bool setup_completed_;
|
| +
|
| + std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SyncArcPackageHelper);
|
| +};
|
| +
|
| +} // namespace arc
|
| +
|
| +#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
|
|
|