Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 7119d54935faaca19605faa5b659a94d8de1cb97..8c14f6b9f3600ee9bbb5ea59bd8fd0cc84b015b0 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -168,82 +168,6 @@ void DeterminePossibleFieldTypesForUpload(
}
}
-// Check for unidentified forms among those with the most query or upload
-// requests. If found, 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 char* kPopularFormSignatures[] = {
- "10135289994685082173",
- "7883844738557049416",
- "14651966297402649464",
- "17177862793067325164",
- "15222964025577790589",
- "14138834153984647462",
- "1522221299769735301",
- "8604254969743383026",
- "1080809576396139601",
- "10591138561307360539",
- "3483444043750493124",
- "3764098888295731941",
- "957190629194980629",
- "11314948061179499915",
- "2226179674176240706",
- "9886974103926218264",
- "16089161644523512553",
- "17395441333004474813",
- "7131540066857838464",
- "1799736626243038725",
- "4314535457620699296",
- "16597101416150066076",
- "11571064402466920341",
- "17529644200058912705",
- "17442663271235869548",
- "10423886468225016833",
- "8205718441232482003",
- "12566467866837059201",
- "14998753650075003914",
- "8463873542596795823",
- "3341181348270175432",
- "12047213380448477438",
- "7626117232464424739",
- "6755316823149690927",
- "17343480863386343671",
- "4345267765838738360"
-};
-
-void CheckForPopularForms(const std::vector<FormStructure*>& forms,
- TabContentsWrapper* tab_contents_wrapper,
- TabContents* tab_contents) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(kEnableAutofillFeedback))
- return;
-
- for (std::vector<FormStructure*>::const_iterator it = forms.begin();
- it != forms.end();
- ++it) {
- std::string form_signature = (*it)->FormSignature();
- for (size_t i = 0; i < arraysize(kPopularFormSignatures); ++i) {
- if (form_signature != kPopularFormSignatures[i])
- continue;
-
- 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_POPULAR_FORM_MESSAGE,
- ASCIIToUTF16(form_signature),
- UTF8ToUTF16((*it)->source_url().spec()));
-
- InfoBarTabHelper* infobar_helper =
- tab_contents_wrapper->infobar_tab_helper();
- infobar_helper->AddInfoBar(
- new AutofillFeedbackInfoBarDelegate(infobar_helper, text, link,
- message));
- break;
- }
- }
-}
-
} // namespace
AutofillManager::AutofillManager(TabContentsWrapper* tab_contents)
« no previous file with comments | « chrome/browser/autocomplete_history_manager_unittest.cc ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698