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

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: 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 ArcBridgeService;
Luis Héctor Chávez 2016/07/25 17:56:24 unused
lgcheng 2016/07/25 20:45:32 Done.
24
25 class SyncArcPackageHelper {
26 public:
27 static SyncArcPackageHelper* GetInstance();
28
29 void SetupTest(SyncTest* test);
30
31 void ClearUp();
stevenjb 2016/07/25 16:45:08 nit: CleanUp
lgcheng 2016/07/25 20:45:32 Done.
32
33 void InstallPackageWithIndex(Profile* profile, int id);
Luis Héctor Chávez 2016/07/25 17:56:24 Can these ints be size_t?
lgcheng 2016/07/25 20:45:32 Done.
34
35 void UninstallPackageWithIndex(Profile* profile, int id);
36
37 void ClearPackages(Profile* profile);
38
39 bool AllProfilesHaveSamePackages();
40
41 bool AllProfilesHaveSamePackageDetail();
42
43 void SetupArcService(Profile* profile, const char* id);
44
45 private:
46 friend struct base::DefaultSingletonTraits<SyncArcPackageHelper>;
47
48 SyncArcPackageHelper();
49 ~SyncArcPackageHelper();
50
51 void InstallPackage(Profile* profile,
52 const mojom::ArcPackageInfo& package);
53
54 void UninstallPackage(Profile* profile, const std::string& package_name);
55
56 // Returns true if |profile1| has the same arc packages as |profile2|.
57 bool ArcPackageMatch(Profile* profile1, Profile* profile2);
stevenjb 2016/07/25 16:45:08 ArcPackagesMatch
lgcheng 2016/07/25 20:45:32 Done.
58
59 // Returns true if |profile1| has the same arc packages and detail package
60 // informaton as |profile2|.
61 bool ArcPackageDetailMatch(Profile* profile1, Profile* profile2);
stevenjb 2016/07/25 16:45:08 ArcPackageDetailsMatch
lgcheng 2016/07/25 20:45:32 Done.
62
63 SyncTest* test_;
64 bool setup_completed_;
65
66 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
67
68 DISALLOW_COPY_AND_ASSIGN(SyncArcPackageHelper);
69 };
70
71 } // namespace arc
72
73 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698