OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents/insecure_content_infobar_delegate.h" | 5 #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/google/google_util.h" |
8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
9 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
10 #include "content/common/page_transition_types.h" | 11 #include "content/common/page_transition_types.h" |
11 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
12 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
13 | 14 |
14 InsecureContentInfoBarDelegate::InsecureContentInfoBarDelegate( | 15 InsecureContentInfoBarDelegate::InsecureContentInfoBarDelegate( |
15 TabContentsWrapper* tab_contents, | 16 TabContentsWrapper* tab_contents, |
16 InfoBarType type) | 17 InfoBarType type) |
17 : ConfirmInfoBarDelegate(tab_contents->tab_contents()), | 18 : ConfirmInfoBarDelegate(tab_contents->tab_contents()), |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 new ViewMsg_SetAllowRunningInsecureContent(routing_id, true)); | 71 new ViewMsg_SetAllowRunningInsecureContent(routing_id, true)); |
71 return true; | 72 return true; |
72 } | 73 } |
73 | 74 |
74 string16 InsecureContentInfoBarDelegate::GetLinkText() const { | 75 string16 InsecureContentInfoBarDelegate::GetLinkText() const { |
75 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 76 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
76 } | 77 } |
77 | 78 |
78 bool InsecureContentInfoBarDelegate::LinkClicked( | 79 bool InsecureContentInfoBarDelegate::LinkClicked( |
79 WindowOpenDisposition disposition) { | 80 WindowOpenDisposition disposition) { |
80 tab_contents_->tab_contents()->OpenURL(GURL( | 81 tab_contents_->tab_contents()->OpenURL( |
81 "https://www.google.com/support/chrome/bin/answer.py?answer=1342714"), | 82 google_util::AppendGoogleLocaleParam(GURL( |
| 83 "https://www.google.com/support/chrome/bin/answer.py?answer=1342714")), |
82 GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 84 GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
83 PageTransition::LINK); | 85 PageTransition::LINK); |
84 return false; | 86 return false; |
85 } | 87 } |
OLD | NEW |