OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SEARCH_ENGINES_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEARCH_ENGINES_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEARCH_ENGINES_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEARCH_ENGINES_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Returns true iff |other|'s TemplateURLs matches the verifier's TemplateURLs | 38 // Returns true iff |other|'s TemplateURLs matches the verifier's TemplateURLs |
39 // by sync GUIDs and user-visible fields. | 39 // by sync GUIDs and user-visible fields. |
40 bool ServicesMatch(TemplateURLService* other); | 40 bool ServicesMatch(TemplateURLService* other); |
41 | 41 |
42 // Returns true iff all TemplateURLServices match with the verifier. | 42 // Returns true iff all TemplateURLServices match with the verifier. |
43 bool AllServicesMatch(); | 43 bool AllServicesMatch(); |
44 | 44 |
45 // Create a TemplateURL with some test values based on |seed|. The caller owns | 45 // Create a TemplateURL with some test values based on |seed|. The caller owns |
46 // the returned TemplateURL*. | 46 // the returned TemplateURL*. |
47 TemplateURL* CreateTestTemplateURL(int seed); | 47 TemplateURL* CreateTestTemplateURL(int seed); |
| 48 TemplateURL* CreateTestTemplateURL(int seed, |
| 49 const string16& keyword, |
| 50 const std::string& sync_guid); |
| 51 TemplateURL* CreateTestTemplateURL(int seed, |
| 52 const std::string& url, |
| 53 const string16& keyword, |
| 54 const std::string& sync_guid); |
48 | 55 |
49 // Add a search engine based on a seed to the service at index |profile| and the | 56 // Add a search engine based on a seed to the service at index |profile| and the |
50 // verifier if it is used. | 57 // verifier if it is used. |
51 void AddSearchEngine(int profile, int seed); | 58 void AddSearchEngine(int profile, int seed); |
52 | 59 |
53 // Retrieves a search engine from the service at index |profile| with original | 60 // Retrieves a search engine from the service at index |profile| with original |
54 // keyword |keyword| and changes its user-visible fields. Does the same to the | 61 // keyword |keyword| and changes its user-visible fields. Does the same to the |
55 // verifier, if it is used. | 62 // verifier, if it is used. |
56 void EditSearchEngine(int profile, | 63 void EditSearchEngine(int profile, |
57 const std::string& keyword, | 64 const string16& keyword, |
58 const std::string& short_name, | 65 const string16& short_name, |
59 const std::string& new_keyword, | 66 const string16& new_keyword, |
60 const std::string& url); | 67 const std::string& url); |
61 | 68 |
62 // Deletes a search engine from the service at index |profile| with original | 69 // Deletes a search engine from the service at index |profile| with original |
63 // keyword |keyword|. Does the same to the verifier, if it is used. | 70 // keyword |keyword|. Does the same to the verifier, if it is used. |
64 void DeleteSearchEngineByKeyword(int profile, const string16 keyword); | 71 void DeleteSearchEngineByKeyword(int profile, const string16& keyword); |
65 | 72 |
66 // Deletes a search engine from the service at index |profile| which was | 73 // Deletes a search engine from the service at index |profile| which was |
67 // generated by seed |seed|. | 74 // generated by seed |seed|. |
68 void DeleteSearchEngineBySeed(int profile, int seed); | 75 void DeleteSearchEngineBySeed(int profile, int seed); |
69 | 76 |
70 // Change the search engine generated with |seed| in service at index |profile| | 77 // Change the search engine generated with |seed| in service at index |profile| |
71 // to be the new default. Does the same to the verifier, if it is used. | 78 // to be the new default. Does the same to the verifier, if it is used. |
72 void ChangeDefaultSearchProvider(int profile, int seed); | 79 void ChangeDefaultSearchProvider(int profile, int seed); |
73 | 80 |
74 } // namespace search_engines_helper | 81 } // namespace search_engines_helper |
75 | 82 |
76 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEARCH_ENGINES_HELPER_H_ | 83 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEARCH_ENGINES_HELPER_H_ |
OLD | NEW |