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_EXTENSIONS_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_EXTENSIONS_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_EXTENSIONS_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_EXTENSIONS_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 14 matching lines...) Expand all Loading... |
25 // as the verifier. | 25 // as the verifier. |
26 bool AllProfilesHaveSameExtensionsAsVerifier() WARN_UNUSED_RESULT; | 26 bool AllProfilesHaveSameExtensionsAsVerifier() WARN_UNUSED_RESULT; |
27 | 27 |
28 // Returns true iff all existing profiles have the same extensions. | 28 // Returns true iff all existing profiles have the same extensions. |
29 bool AllProfilesHaveSameExtensions() WARN_UNUSED_RESULT; | 29 bool AllProfilesHaveSameExtensions() WARN_UNUSED_RESULT; |
30 | 30 |
31 // Installs the extension for the given index to |profile|, and returns the | 31 // Installs the extension for the given index to |profile|, and returns the |
32 // extension ID of the new extension. | 32 // extension ID of the new extension. |
33 std::string InstallExtension(Profile* profile, int index); | 33 std::string InstallExtension(Profile* profile, int index); |
34 | 34 |
| 35 // Installs the extension for the given index to all profiles (including the |
| 36 // verifier), and returns the extension ID of the new extension. |
| 37 std::string InstallExtensionForAllProfiles(int index); |
| 38 |
35 // Uninstalls the extension for the given index from |profile|. Assumes that | 39 // Uninstalls the extension for the given index from |profile|. Assumes that |
36 // it was previously installed. | 40 // it was previously installed. |
37 void UninstallExtension(Profile* profile, int index); | 41 void UninstallExtension(Profile* profile, int index); |
38 | 42 |
39 // Returns a vector containing the indices of all currently installed | 43 // Returns a vector containing the indices of all currently installed |
40 // test extensions on |profile|. | 44 // test extensions on |profile|. |
41 std::vector<int> GetInstalledExtensions(Profile* profile); | 45 std::vector<int> GetInstalledExtensions(Profile* profile); |
42 | 46 |
43 // Installs all pending synced extensions for |profile|. | 47 // Installs all pending synced extensions for |profile|. |
44 void InstallExtensionsPendingForSync(Profile* profile); | 48 void InstallExtensionsPendingForSync(Profile* profile); |
(...skipping 20 matching lines...) Expand all Loading... |
65 // Returns a unique extension name based in the integer |index|. | 69 // Returns a unique extension name based in the integer |index|. |
66 std::string CreateFakeExtensionName(int index); | 70 std::string CreateFakeExtensionName(int index); |
67 | 71 |
68 // Converts a fake extension name back into the index used to generate it. | 72 // Converts a fake extension name back into the index used to generate it. |
69 // Returns true if successful, false on failure. | 73 // Returns true if successful, false on failure. |
70 bool ExtensionNameToIndex(const std::string& name, int* index); | 74 bool ExtensionNameToIndex(const std::string& name, int* index); |
71 | 75 |
72 } // namespace extensions_helper | 76 } // namespace extensions_helper |
73 | 77 |
74 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_EXTENSIONS_HELPER_H_ | 78 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_EXTENSIONS_HELPER_H_ |
OLD | NEW |