| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // be associated with the user. More concretely, it checks if there are any | 193 // be associated with the user. More concretely, it checks if there are any |
| 194 // addresses with this country or if the user's system timezone is in the | 194 // addresses with this country or if the user's system timezone is in the |
| 195 // given country. | 195 // given country. |
| 196 virtual bool IsCountryOfInterest(const std::string& country_code) const; | 196 virtual bool IsCountryOfInterest(const std::string& country_code) const; |
| 197 | 197 |
| 198 // Returns our best guess for the country a user is likely to use when | 198 // Returns our best guess for the country a user is likely to use when |
| 199 // inputting a new address. The value is calculated once and cached, so it | 199 // inputting a new address. The value is calculated once and cached, so it |
| 200 // will only update when Chrome is restarted. | 200 // will only update when Chrome is restarted. |
| 201 virtual const std::string& GetDefaultCountryCodeForNewAddress() const; | 201 virtual const std::string& GetDefaultCountryCodeForNewAddress() const; |
| 202 | 202 |
| 203 // Whether Chromium has already attempted to access the user's address book. |
| 204 virtual bool HasAccessMacContacts(); |
| 205 // Invokes the system prompt to give Chromium access to the user's address |
| 206 // book. This method is blocking. |
| 207 virtual void AccessMacContacts(); |
| 208 |
| 203 protected: | 209 protected: |
| 204 // Only PersonalDataManagerFactory and certain tests can create instances of | 210 // Only PersonalDataManagerFactory and certain tests can create instances of |
| 205 // PersonalDataManager. | 211 // PersonalDataManager. |
| 206 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FirstMiddleLast); | 212 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, FirstMiddleLast); |
| 207 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtStartup); | 213 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtStartup); |
| 208 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, | 214 FRIEND_TEST_ALL_PREFIXES(PersonalDataManagerTest, |
| 209 AggregateExistingAuxiliaryProfile); | 215 AggregateExistingAuxiliaryProfile); |
| 210 friend class autofill::AutofillInteractiveTest; | 216 friend class autofill::AutofillInteractiveTest; |
| 211 friend class autofill::AutofillTest; | 217 friend class autofill::AutofillTest; |
| 212 friend class autofill::PersonalDataManagerFactory; | 218 friend class autofill::PersonalDataManagerFactory; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 350 |
| 345 // An observer to listen for changes to prefs::kAutofillEnabled. | 351 // An observer to listen for changes to prefs::kAutofillEnabled. |
| 346 scoped_ptr<BooleanPrefMember> enabled_pref_; | 352 scoped_ptr<BooleanPrefMember> enabled_pref_; |
| 347 | 353 |
| 348 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); | 354 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
| 349 }; | 355 }; |
| 350 | 356 |
| 351 } // namespace autofill | 357 } // namespace autofill |
| 352 | 358 |
| 353 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ | 359 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ |
| OLD | NEW |