summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 22:20:34 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 22:20:34 +0000
commitf8af513e026083f3a4c02b131d69fb2ad37ac231 (patch)
treed0dce4364b443ea40702cca5d1707ea688932e25 /chrome/browser/autofill
parent8ba78f45a91c2026369a2d106efbfbb9091a9a3d (diff)
downloadchromium_src-f8af513e026083f3a4c02b131d69fb2ad37ac231.zip
chromium_src-f8af513e026083f3a4c02b131d69fb2ad37ac231.tar.gz
chromium_src-f8af513e026083f3a4c02b131d69fb2ad37ac231.tar.bz2
Fetch AutoFill form data from server only when user data is present.
Adds code to only query the AutoFill server if the user has AutoFill profile or credit card information set up in their preferences. BUG=39923 TEST=NONE Review URL: http://codereview.chromium.org/1517009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43271 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_manager.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 5734291..628cb9a 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -93,7 +93,13 @@ void AutoFillManager::FormsSeen(
DeterminePossibleFieldTypes(form_structure);
form_structures_.push_back(form_structure);
}
- download_manager_.StartQueryRequest(form_structures_);
+
+ // Only query the server for form data if the user has profile or
+ // credit card data set up.
+ if (!personal_data_->profiles().empty() ||
+ !personal_data_->credit_cards().empty()) {
+ download_manager_.StartQueryRequest(form_structures_);
+ }
}
bool AutoFillManager::GetAutoFillSuggestions(