| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Checks suitability of |profile| for adding to the user's set of profiles. | 209 // Checks suitability of |profile| for adding to the user's set of profiles. |
| 210 static bool IsValidLearnableProfile(const AutofillProfile& profile, | 210 static bool IsValidLearnableProfile(const AutofillProfile& profile, |
| 211 const std::string& app_locale); | 211 const std::string& app_locale); |
| 212 | 212 |
| 213 // Merges |new_profile| into one of the |existing_profiles| if possible; | 213 // Merges |new_profile| into one of the |existing_profiles| if possible; |
| 214 // otherwise appends |new_profile| to the end of that list. Fills | 214 // otherwise appends |new_profile| to the end of that list. Fills |
| 215 // |merged_profiles| with the result. Returns the |guid| of the new or updated | 215 // |merged_profiles| with the result. Returns the |guid| of the new or updated |
| 216 // profile. | 216 // profile. |
| 217 static std::string MergeProfile( | 217 static std::string MergeProfile( |
| 218 const AutofillProfile& new_profile, | 218 const AutofillProfile& new_profile, |
| 219 const std::vector<AutofillProfile*>& existing_profiles, | 219 std::vector<AutofillProfile*> existing_profiles, |
| 220 const std::string& app_locale, | 220 const std::string& app_locale, |
| 221 std::vector<AutofillProfile>* merged_profiles); | 221 std::vector<AutofillProfile>* merged_profiles); |
| 222 | 222 |
| 223 // Returns true if |country_code| is a country that the user is likely to | 223 // Returns true if |country_code| is a country that the user is likely to |
| 224 // be associated with the user. More concretely, it checks if there are any | 224 // be associated with the user. More concretely, it checks if there are any |
| 225 // addresses with this country or if the user's system timezone is in the | 225 // addresses with this country or if the user's system timezone is in the |
| 226 // given country. | 226 // given country. |
| 227 virtual bool IsCountryOfInterest(const std::string& country_code) const; | 227 virtual bool IsCountryOfInterest(const std::string& country_code) const; |
| 228 | 228 |
| 229 // Returns our best guess for the country a user is likely to use when | 229 // Returns our best guess for the country a user is likely to use when |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 428 |
| 429 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. | 429 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. |
| 430 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; | 430 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; |
| 431 | 431 |
| 432 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 432 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 433 }; | 433 }; |
| 434 | 434 |
| 435 } // namespace autofill | 435 } // namespace autofill |
| 436 | 436 |
| 437 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 437 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |