| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/ref_counted.h" |
| 14 #include "base/string16.h" | 15 #include "base/string16.h" |
| 15 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 16 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 16 | 17 |
| 17 class AutofillEntry; | 18 class AutofillEntry; |
| 18 class AutofillKey; | 19 class AutofillKey; |
| 19 class AutofillProfile; | 20 class AutofillProfile; |
| 20 class AutofillType; | 21 class AutofillType; |
| 21 class PersonalDataManager; | 22 class PersonalDataManager; |
| 22 class WebDataService; | 23 class WebDataService; |
| 23 | 24 |
| 24 namespace autofill_helper { | 25 namespace autofill_helper { |
| 25 | 26 |
| 26 enum ProfileType { | 27 enum ProfileType { |
| 27 PROFILE_MARION, | 28 PROFILE_MARION, |
| 28 PROFILE_HOMER, | 29 PROFILE_HOMER, |
| 29 PROFILE_FRASIER, | 30 PROFILE_FRASIER, |
| 30 PROFILE_NULL | 31 PROFILE_NULL |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 // Used to access the web data service within a particular sync profile. | 34 // Used to access the web data service within a particular sync profile. |
| 34 WebDataService* GetWebDataService(int index) WARN_UNUSED_RESULT; | 35 scoped_refptr<WebDataService> GetWebDataService(int index) WARN_UNUSED_RESULT; |
| 35 | 36 |
| 36 // Used to access the personal data manager within a particular sync profile. | 37 // Used to access the personal data manager within a particular sync profile. |
| 37 PersonalDataManager* GetPersonalDataManager(int index) WARN_UNUSED_RESULT; | 38 PersonalDataManager* GetPersonalDataManager(int index) WARN_UNUSED_RESULT; |
| 38 | 39 |
| 39 // Adds the form fields in |keys| to the WebDataService of sync profile | 40 // Adds the form fields in |keys| to the WebDataService of sync profile |
| 40 // |profile|. | 41 // |profile|. |
| 41 void AddKeys(int profile, const std::set<AutofillKey>& keys); | 42 void AddKeys(int profile, const std::set<AutofillKey>& keys); |
| 42 | 43 |
| 43 // Removes the form field in |key| from the WebDataService of sync profile | 44 // Removes the form field in |key| from the WebDataService of sync profile |
| 44 // |profile|. | 45 // |profile|. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Compares the autofill profiles for all sync profiles, and returns true if | 92 // Compares the autofill profiles for all sync profiles, and returns true if |
| 92 // they all match. | 93 // they all match. |
| 93 bool AllProfilesMatch() WARN_UNUSED_RESULT; | 94 bool AllProfilesMatch() WARN_UNUSED_RESULT; |
| 94 | 95 |
| 95 // Creates a test autofill profile based on the persona specified in |type|. | 96 // Creates a test autofill profile based on the persona specified in |type|. |
| 96 AutofillProfile CreateAutofillProfile(ProfileType type); | 97 AutofillProfile CreateAutofillProfile(ProfileType type); |
| 97 | 98 |
| 98 } // namespace autofill_helper | 99 } // namespace autofill_helper |
| 99 | 100 |
| 100 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ | 101 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_AUTOFILL_HELPER_H_ |
| OLD | NEW |