| 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_AUTOFILL_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Updates the autofill profile with guid |guid| in sync profile |profile| | 82 // Updates the autofill profile with guid |guid| in sync profile |profile| |
| 83 // to |type| and |value|. | 83 // to |type| and |value|. |
| 84 void UpdateProfile(int profile, | 84 void UpdateProfile(int profile, |
| 85 const std::string& guid, | 85 const std::string& guid, |
| 86 const autofill::AutofillType& type, | 86 const autofill::AutofillType& type, |
| 87 const base::string16& value); | 87 const base::string16& value); |
| 88 | 88 |
| 89 // Gets all the Autofill profiles in the PersonalDataManager of sync profile | 89 // Gets all the Autofill profiles in the PersonalDataManager of sync profile |
| 90 // |profile|. | 90 // |profile|. |
| 91 const std::vector<autofill::AutofillProfile*>& GetAllProfiles( | 91 const std::vector<autofill::AutofillProfile*>& GetAllAutoFillProfiles( |
| 92 int profile) WARN_UNUSED_RESULT; | 92 int profile) WARN_UNUSED_RESULT; |
| 93 | 93 |
| 94 // Returns the number of autofill profiles contained by sync profile | 94 // Returns the number of autofill profiles contained by sync profile |
| 95 // |profile|. | 95 // |profile|. |
| 96 int GetProfileCount(int profile); | 96 int GetProfileCount(int profile); |
| 97 | 97 |
| 98 // Returns the number of autofill keys contained by sync profile |profile|. | 98 // Returns the number of autofill keys contained by sync profile |profile|. |
| 99 int GetKeyCount(int profile); | 99 int GetKeyCount(int profile); |
| 100 | 100 |
| 101 // Compares the Autofill profiles in the PersonalDataManagers of sync profiles | 101 // Compares the Autofill profiles in the PersonalDataManagers of sync profiles |
| 102 // |profile_a| and |profile_b|. Returns true if they match. | 102 // |profile_a| and |profile_b|. Returns true if they match. |
| 103 bool ProfilesMatch(int profile_a, int profile_b) WARN_UNUSED_RESULT; | 103 bool ProfilesMatch(int profile_a, int profile_b) WARN_UNUSED_RESULT; |
| 104 | 104 |
| 105 // Compares the autofill profiles for all sync profiles, and returns true if | 105 // Compares the autofill profiles for all sync profiles, and returns true if |
| 106 // they all match. | 106 // they all match. |
| 107 bool AllProfilesMatch() WARN_UNUSED_RESULT; | 107 bool AllProfilesMatch() WARN_UNUSED_RESULT; |
| 108 | 108 |
| 109 // Allows the syncers to run until ProfilesMatch() returns true. | 109 // Allows the syncers to run until ProfilesMatch() returns true. |
| 110 bool AwaitProfilesMatch(int profile_a, int profile_b); | 110 bool AwaitProfilesMatch(int profile_a, int profile_b); |
| 111 | 111 |
| 112 // Creates a test autofill profile based on the persona specified in |type|. | 112 // Creates a test autofill profile based on the persona specified in |type|. |
| 113 autofill::AutofillProfile CreateAutofillProfile(ProfileType type); | 113 autofill::AutofillProfile CreateAutofillProfile(ProfileType type); |
| 114 | 114 |
| 115 // Creates a test autofill profile with a unique GUID | 115 // Creates a test autofill profile with a unique GUID |
| 116 autofill::AutofillProfile CreateUniqueAutofillProfile(); | 116 autofill::AutofillProfile CreateUniqueAutofillProfile(); |
| 117 | 117 |
| 118 } // namespace autofill_helper | 118 } // namespace autofill_helper |
| 119 | 119 |
| 120 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ | 120 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ |
| OLD | NEW |