| 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 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 11 #include "sync/api/string_ordinal.h" | 11 #include "sync/api/string_ordinal.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 namespace apps_helper { | 15 namespace apps_helper { |
| 16 | 16 |
| 17 // Returns true iff the profile with index |index| has the same apps as the | 17 // Returns true iff the profile with index |index| has the same apps as the |
| 18 // verifier. | 18 // verifier. |
| 19 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; | 19 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; |
| 20 | 20 |
| 21 // Returns true iff all existing profiles have the same apps as the verifier. | 21 // Returns true iff all existing profiles have the same apps as the verifier. |
| 22 bool AllProfilesHaveSameAppsAsVerifier() WARN_UNUSED_RESULT; | 22 bool AllProfilesHaveSameAppsAsVerifier() WARN_UNUSED_RESULT; |
| 23 | 23 |
| 24 // Installs the app for the given index to |profile|, and returns the extension | 24 // Installs the app for the given index to |profile|, and returns the extension |
| 25 // ID of the new app. | 25 // ID of the new app. |
| 26 std::string InstallApp(Profile* profile, int index); | 26 std::string InstallApp(Profile* profile, int index); |
| 27 | 27 |
| 28 // Installs the platform app for the given index to |profile|, and returns the |
| 29 // extension ID of the new app. |
| 30 std::string InstallPlatformApp(Profile* profile, int index); |
| 31 |
| 28 // Installs the app for the given index to all profiles (including the | 32 // Installs the app for the given index to all profiles (including the |
| 29 // verifier), and returns the extension ID of the new app. | 33 // verifier), and returns the extension ID of the new app. |
| 30 std::string InstallAppForAllProfiles(int index); | 34 std::string InstallAppForAllProfiles(int index); |
| 31 | 35 |
| 32 // Uninstalls the app for the given index from |profile|. Assumes that it was | 36 // Uninstalls the app for the given index from |profile|. Assumes that it was |
| 33 // previously installed. | 37 // previously installed. |
| 34 void UninstallApp(Profile* profile, int index); | 38 void UninstallApp(Profile* profile, int index); |
| 35 | 39 |
| 36 // Installs all pending synced apps for |profile|. | 40 // Installs all pending synced apps for |profile|. |
| 37 void InstallAppsPendingForSync(Profile* profile); | 41 void InstallAppsPendingForSync(Profile* profile); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // The main intention of this is to properly setup the values on the verifier | 78 // The main intention of this is to properly setup the values on the verifier |
| 75 // profile in situations where the other profiles have conflicting values. | 79 // profile in situations where the other profiles have conflicting values. |
| 76 void CopyNTPOrdinals(Profile* source, Profile* destination, int index); | 80 void CopyNTPOrdinals(Profile* source, Profile* destination, int index); |
| 77 | 81 |
| 78 // Fix any NTP icon collisions that are currently in |profile|. | 82 // Fix any NTP icon collisions that are currently in |profile|. |
| 79 void FixNTPOrdinalCollisions(Profile* profile); | 83 void FixNTPOrdinalCollisions(Profile* profile); |
| 80 | 84 |
| 81 } // namespace apps_helper | 85 } // namespace apps_helper |
| 82 | 86 |
| 83 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ | 87 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ |
| OLD | NEW |