OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "chrome/browser/sync/test/integration/sync_test.h" | 11 #include "chrome/browser/sync/test/integration/sync_test.h" |
12 #include "chrome/common/string_ordinal.h" | 12 #include "chrome/common/string_ordinal.h" |
13 | 13 |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 namespace apps_helper { | 16 namespace apps_helper { |
17 | 17 |
18 // Returns true iff the profile with index |index| has the same apps as the | 18 // Returns true iff the profile with index |index| has the same apps as the |
19 // verifier. | 19 // verifier. |
20 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; | 20 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; |
21 | 21 |
22 // Returns true iff all existing profiles have the same apps as the verifier. | 22 // Returns true iff all existing profiles have the same apps as the verifier. |
23 bool AllProfilesHaveSameAppsAsVerifier() WARN_UNUSED_RESULT; | 23 bool AllProfilesHaveSameAppsAsVerifier() WARN_UNUSED_RESULT; |
24 | 24 |
25 // Installs the app for the given index to |profile|, and returns the extension | 25 // Installs the app for the given index to |profile|, and returns the extension |
26 // ID of the new app. | 26 // ID of the new app. |
27 std::string InstallApp(Profile* profile, int index); | 27 std::string InstallApp(Profile* profile, int index); |
28 | 28 |
| 29 // Installs the app for the given index to all profiles (including the |
| 30 // verifier), and returns the extension ID of the new app. |
| 31 std::string InstallAppForAllProfiles(int index); |
| 32 |
29 // Uninstalls the app for the given index from |profile|. Assumes that it was | 33 // Uninstalls the app for the given index from |profile|. Assumes that it was |
30 // previously installed. | 34 // previously installed. |
31 void UninstallApp(Profile* profile, int index); | 35 void UninstallApp(Profile* profile, int index); |
32 | 36 |
33 // Installs all pending synced apps for |profile|. | 37 // Installs all pending synced apps for |profile|. |
34 void InstallAppsPendingForSync(Profile* profile); | 38 void InstallAppsPendingForSync(Profile* profile); |
35 | 39 |
36 // Enables the app for the given index on |profile|. | 40 // Enables the app for the given index on |profile|. |
37 void EnableApp(Profile* profile, int index); | 41 void EnableApp(Profile* profile, int index); |
38 | 42 |
(...skipping 29 matching lines...) Expand all Loading... |
68 // The main intention of this is to properly setup the values on the verifier | 72 // The main intention of this is to properly setup the values on the verifier |
69 // profile in situations where the other profiles have conflicting values. | 73 // profile in situations where the other profiles have conflicting values. |
70 void CopyNTPOrdinals(Profile* source, Profile* destination, int index); | 74 void CopyNTPOrdinals(Profile* source, Profile* destination, int index); |
71 | 75 |
72 // Fix any NTP icon collisions that are currently in |profile|. | 76 // Fix any NTP icon collisions that are currently in |profile|. |
73 void FixNTPOrdinalCollisions(Profile* profile); | 77 void FixNTPOrdinalCollisions(Profile* profile); |
74 | 78 |
75 } // namespace apps_helper | 79 } // namespace apps_helper |
76 | 80 |
77 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ | 81 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ |
OLD | NEW |