summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorgeorgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 23:04:04 +0000
committergeorgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-07 23:04:04 +0000
commitef7090c7e60de7d41bedb7bf5ae1c74dc52786fd (patch)
treeb49deed2e98661b8e35d58f863d2176692e955ac /chrome/browser/autofill
parentaec567d219a25597c3b854571201b585fb1a5f6b (diff)
downloadchromium_src-ef7090c7e60de7d41bedb7bf5ae1c74dc52786fd.zip
chromium_src-ef7090c7e60de7d41bedb7bf5ae1c74dc52786fd.tar.gz
chromium_src-ef7090c7e60de7d41bedb7bf5ae1c74dc52786fd.tar.bz2
Added "Learn More" link to autofill on Windows.
TEST=Should appear on the bottom left in autofill dialog and should work when clicked :) BUG=none Review URL: http://codereview.chromium.org/1551020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_dialog_gtk.cc7
-rw-r--r--chrome/browser/autofill/autofill_infobar_delegate.cc5
-rw-r--r--chrome/browser/autofill/autofill_manager.cc4
-rw-r--r--chrome/browser/autofill/autofill_manager.h3
4 files changed, 12 insertions, 7 deletions
diff --git a/chrome/browser/autofill/autofill_dialog_gtk.cc b/chrome/browser/autofill/autofill_dialog_gtk.cc
index 9b7d4b8..7c0f5b6 100644
--- a/chrome/browser/autofill/autofill_dialog_gtk.cc
+++ b/chrome/browser/autofill/autofill_dialog_gtk.cc
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/autofill/autofill_manager.h"
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/autofill/form_group.h"
@@ -760,11 +761,9 @@ void AutoFillDialog::OnLabelChanged(GtkEntry* label, GtkWidget* expander) {
}
void AutoFillDialog::OnLinkActivated() {
- // TODO(jhawkins): Maybe this should be in a grd file?
- GURL url =
- GURL("http://www.google.com/support/chrome/bin/answer.py?answer=142893");
Browser* browser = BrowserList::GetLastActive();
- browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::TYPED);
+ browser->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), NEW_FOREGROUND_TAB,
+ PageTransition::TYPED);
}
GtkWidget* AutoFillDialog::InitGroup(int name_id,
diff --git a/chrome/browser/autofill/autofill_infobar_delegate.cc b/chrome/browser/autofill/autofill_infobar_delegate.cc
index 4f1fc35..c092249 100644
--- a/chrome/browser/autofill/autofill_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_infobar_delegate.cc
@@ -98,8 +98,7 @@ std::wstring AutoFillInfoBarDelegate::GetLinkText() {
}
bool AutoFillInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- GURL url =
- GURL("http://www.google.com/support/chrome/bin/answer.py?answer=142893");
- browser_->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::TYPED);
+ browser_->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), NEW_FOREGROUND_TAB,
+ PageTransition::TYPED);
return true;
}
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 8a6d3a7..5ae1cd5 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -30,6 +30,10 @@ const double kAutoFillPositiveUploadRateDefaultValue = 0.01;
const double kAutoFillNegativeUploadRateDefaultValue = 0.01;
} // namespace
+// TODO(jhawkins): Maybe this should be in a grd file?
+const char* kAutoFillLearnMoreUrl =
+ "http://www.google.com/support/chrome/bin/answer.py?answer=142893";
+
AutoFillManager::AutoFillManager(TabContents* tab_contents)
: tab_contents_(tab_contents),
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index b9eafbf..4f455b9 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -27,6 +27,9 @@ class FormStructure;
class PrefService;
class TabContents;
+// TODO(jhawkins): Maybe this should be in a grd file?
+extern const char* kAutoFillLearnMoreUrl;
+
// Manages saving and restoring the user's personal information entered into web
// forms.
class AutoFillManager : public RenderViewHostDelegate::AutoFill,