Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.h

Issue 2174753004: arc:Integration test for Arc package Chrome sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@current
Patch Set: Issue addressed. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
7
8 #include <map>
9
10 #include "base/macros.h"
11 #include "base/memory/singleton.h"
12 #include "components/arc/common/app.mojom.h"
13
14 class Profile;
15 class SyncTest;
16
17 namespace chromeos {
18 class ScopedUserManagerEnabler;
19 }
20
21 namespace arc {
22
23 class SyncArcPackageHelper {
24 public:
25 static SyncArcPackageHelper* GetInstance();
26
27 void SetupTest(SyncTest* test);
28
29 void CleanUp();
30
31 void InstallPackageWithIndex(Profile* profile, size_t id);
32
33 void UninstallPackageWithIndex(Profile* profile, size_t id);
34
35 void ClearPackages(Profile* profile);
36
37 bool AllProfilesHaveSamePackages();
38
39 bool AllProfilesHaveSamePackageDetails();
40
41 void SetupArcService(Profile* profile, size_t id);
42
43 private:
44 friend struct base::DefaultSingletonTraits<SyncArcPackageHelper>;
45
46 SyncArcPackageHelper();
47 ~SyncArcPackageHelper();
48
49 void InstallPackage(Profile* profile, const mojom::ArcPackageInfo& package);
50
51 void UninstallPackage(Profile* profile, const std::string& package_name);
52
53 // Returns true if |profile1| has the same arc packages as |profile2|.
54 bool ArcPackagesMatch(Profile* profile1, Profile* profile2);
55
56 // Returns true if |profile1| has the same arc packages and detail package
57 // informaton as |profile2|.
58 bool ArcPackageDetailsMatch(Profile* profile1, Profile* profile2);
59
60 SyncTest* test_;
61 bool setup_completed_;
62
63 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
64
65 DISALLOW_COPY_AND_ASSIGN(SyncArcPackageHelper);
66 };
67
68 } // namespace arc
69
70 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698