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

Side by Side Diff: chrome/browser/autofill/autofill_cc_infobar_delegate.cc

Issue 3645002: Autofill help link should link to locale specific site (Closed)
Patch Set: Created 10 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" 5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "chrome/browser/autofill/autofill_cc_infobar.h" 10 #include "chrome/browser/autofill/autofill_cc_infobar.h"
11 #include "chrome/browser/autofill/autofill_manager.h" 11 #include "chrome/browser/autofill/autofill_manager.h"
12 #include "chrome/browser/browser_list.h"
12 #include "chrome/browser/prefs/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/profile.h" 14 #include "chrome/browser/profile.h"
14 #include "chrome/browser/tab_contents/tab_contents.h" 15 #include "chrome/browser/tab_contents/tab_contents.h"
15 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 16 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
16 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
17 #include "grit/chromium_strings.h" 18 #include "grit/chromium_strings.h"
18 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
19 #include "grit/theme_resources.h" 20 #include "grit/theme_resources.h"
20 #include "third_party/skia/include/core/SkBitmap.h" 21 #include "third_party/skia/include/core/SkBitmap.h"
21 22
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 host_ = NULL; 86 host_ = NULL;
86 } 87 }
87 return true; 88 return true;
88 } 89 }
89 90
90 string16 AutoFillCCInfoBarDelegate::GetLinkText() { 91 string16 AutoFillCCInfoBarDelegate::GetLinkText() {
91 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_LEARN_MORE); 92 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_LEARN_MORE);
92 } 93 }
93 94
94 bool AutoFillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { 95 bool AutoFillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
95 host_->tab_contents()->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), 96 Browser* browser = BrowserList::GetLastActive();
96 NEW_FOREGROUND_TAB, PageTransition::TYPED); 97 DCHECK(browser);
98 browser->OpenAutoFillHelpTabAndActivate();
97 return false; 99 return false;
98 } 100 }
99 101
100 #if defined(OS_WIN) 102 #if defined(OS_WIN)
101 InfoBar* AutoFillCCInfoBarDelegate::CreateInfoBar() { 103 InfoBar* AutoFillCCInfoBarDelegate::CreateInfoBar() {
102 return CreateAutofillCcInfoBar(this); 104 return CreateAutofillCcInfoBar(this);
103 } 105 }
104 #endif // defined(OS_WIN) 106 #endif // defined(OS_WIN)
105 107
106 InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() { 108 InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() {
107 return PAGE_ACTION_TYPE; 109 return PAGE_ACTION_TYPE;
108 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698