diff options
author | jdonnelly <jdonnelly@chromium.org> | 2016-01-15 08:27:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-15 16:29:30 +0000 |
commit | 066021ea9e12b9a87e9497a1423a0de52c0a4061 (patch) | |
tree | 8f4264666a3509af9c8b579d3c04ab1900fba608 /ios | |
parent | 37de0ee353975fd2533b0e4c05a31587ea4b5473 (diff) | |
download | chromium_src-066021ea9e12b9a87e9497a1423a0de52c0a4061.zip chromium_src-066021ea9e12b9a87e9497a1423a0de52c0a4061.tar.gz chromium_src-066021ea9e12b9a87e9497a1423a0de52c0a4061.tar.bz2 |
Add sync settings to IsCreditCardUploadEnabled.
The check for whether Autofill sync is available matches that in autofill::WalletIntegrationAvailable and should have been in the original implementation of this method. Upload should only be available for clients with sync and for users who include Autofill in their chosen sync types.
The second check covers a privacy requirement that we not offer upload to users who have set a passphrase.
BUG=535784
Review URL: https://codereview.chromium.org/1578953005
Cr-Commit-Position: refs/heads/master@{#369763}
Diffstat (limited to 'ios')
-rw-r--r-- | ios/chrome/browser/ui/autofill/autofill_client_ios.h | 5 | ||||
-rw-r--r-- | ios/chrome/browser/ui/autofill/autofill_client_ios.mm | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ios/chrome/browser/ui/autofill/autofill_client_ios.h b/ios/chrome/browser/ui/autofill/autofill_client_ios.h index af734f4..e3e87ba 100644 --- a/ios/chrome/browser/ui/autofill/autofill_client_ios.h +++ b/ios/chrome/browser/ui/autofill/autofill_client_ios.h @@ -28,6 +28,10 @@ namespace password_manager { class PasswordGenerationManager; } +namespace sync_driver { +class SyncService; +} + namespace autofill { class PersonalDataManager; @@ -48,6 +52,7 @@ class AutofillClientIOS : public AutofillClient { // AutofillClient implementation. PersonalDataManager* GetPersonalDataManager() override; PrefService* GetPrefs() override; + sync_driver::SyncService* GetSyncService() override; IdentityProvider* GetIdentityProvider() override; rappor::RapporService* GetRapporService() override; void HideRequestAutocompleteDialog() override; diff --git a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm index b75c20b..f54fb29 100644 --- a/ios/chrome/browser/ui/autofill/autofill_client_ios.mm +++ b/ios/chrome/browser/ui/autofill/autofill_client_ios.mm @@ -52,6 +52,12 @@ PrefService* AutofillClientIOS::GetPrefs() { return browser_state_->GetPrefs(); } +// TODO(jdonnelly): Implement this when adding credit card upload. +sync_driver::SyncService* AutofillClientIOS::GetSyncService() { + NOTIMPLEMENTED(); + return nullptr; +} + IdentityProvider* AutofillClientIOS::GetIdentityProvider() { return identity_provider_.get(); } |