summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 04:41:13 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 04:41:13 +0000
commit480ac51965719719beb1761274491acb6eda95e9 (patch)
treeab7b21422da44b0631a0fd57659499dd23aaccaf /chrome
parent38fc8947dbc37e1dc67564e8171da6ea7c75564f (diff)
downloadchromium_src-480ac51965719719beb1761274491acb6eda95e9.zip
chromium_src-480ac51965719719beb1761274491acb6eda95e9.tar.gz
chromium_src-480ac51965719719beb1761274491acb6eda95e9.tar.bz2
Remove Autofill Feedback infobar for forms with >100 fields
This infobar has been useful, but the marginal utility of leaving it active is low. BUG=88791 TEST=none Review URL: http://codereview.chromium.org/7457013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd4
-rw-r--r--chrome/browser/autofill/autofill_manager.cc39
2 files changed, 0 insertions, 43 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 5fb5f9b..be7b281 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7716,10 +7716,6 @@ ls' lab.">
The form signature <ph name="FORM_SIGNATURE">$1<ex>15146752457155269744</ex></ph> is for <ph name="FORM_URL">$2<ex>http://www.facebook.com</ex></ph>.
</message>
- <message name="IDS_AUTOFILL_FEEDBACK_LARGE_QUERY_MESSAGE" desc="Feedback message template used when a large Autofill server query is encountered.">
- The forms on <ph name="PAGE_URL">$1<ex>http://www.facebook.com</ex></ph> collectively include 100 or more form fields.
- </message>
-
<if expr="not pp_ifdef('use_titlecase')">
<message name="IDS_THEMES_GROUP_NAME" desc="In sentence case: The title of the themes group">
Themes
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 265a614..b9d133e 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -331,42 +331,6 @@ void CheckForPopularForms(const std::vector<FormStructure*>& forms,
}
}
-// A substantial number of queries to the server include 100 or more form
-// fields. The server ignores such requests, as they are almost certainly not
-// relevant. If we see such a query, present an infobar prompting the user to
-// send Google Feedback identifying these forms. Only executes if the
-// appropriate flag is set in about:flags.
-const size_t kLargeQuerySize = 100;
-
-void CheckForLargeQuery(const std::vector<FormStructure*>& forms,
- TabContentsWrapper* tab_contents_wrapper,
- TabContents* tab_contents) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(kEnableAutofillFeedback))
- return;
-
- size_t num_fields = 0;
- std::string url;
- for (std::vector<FormStructure*>::const_iterator it = forms.begin();
- it != forms.end();
- ++it) {
- num_fields += (*it)->field_count();
- url = (*it)->source_url().spec();
- }
-
- if (num_fields >= kLargeQuerySize) {
- string16 text =
- l10n_util::GetStringUTF16(IDS_AUTOFILL_FEEDBACK_INFOBAR_TEXT);
- string16 link =
- l10n_util::GetStringUTF16(IDS_AUTOFILL_FEEDBACK_INFOBAR_LINK_TEXT);
- std::string message =
- l10n_util::GetStringFUTF8(IDS_AUTOFILL_FEEDBACK_LARGE_QUERY_MESSAGE,
- UTF8ToUTF16(url));
-
- tab_contents_wrapper->AddInfoBar(
- new AutofillFeedbackInfoBarDelegate(tab_contents, text, link, message));
- }
-}
-
} // namespace
AutofillManager::AutofillManager(TabContentsWrapper* tab_contents)
@@ -1147,9 +1111,6 @@ void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
non_queryable_forms.push_back(form_structure.release());
}
- CheckForLargeQuery(form_structures_.get(), tab_contents_wrapper_,
- tab_contents());
-
// If none of the forms were parsed, no use querying the server.
if (!form_structures_.empty() && !disable_download_manager_requests_)
download_manager_.StartQueryRequest(form_structures_, *metric_logger_);