| 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/infobars/insecure_content_infobar_delegate.h" | 5 #include "chrome/browser/infobars/insecure_content_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
| 9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 infobar_service->AddInfoBar(new_infobar.Pass()); | 41 infobar_service->AddInfoBar(new_infobar.Pass()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 InsecureContentInfoBarDelegate::InsecureContentInfoBarDelegate() | 44 InsecureContentInfoBarDelegate::InsecureContentInfoBarDelegate() |
| 45 : ConfirmInfoBarDelegate() { | 45 : ConfirmInfoBarDelegate() { |
| 46 } | 46 } |
| 47 | 47 |
| 48 InsecureContentInfoBarDelegate::~InsecureContentInfoBarDelegate() { | 48 InsecureContentInfoBarDelegate::~InsecureContentInfoBarDelegate() { |
| 49 } | 49 } |
| 50 | 50 |
| 51 std::string InsecureContentInfoBarDelegate::GetIdentifier() const { |
| 52 return "InsecureContentInfoBarDelegate"; |
| 53 } |
| 54 |
| 51 void InsecureContentInfoBarDelegate::InfoBarDismissed() { | 55 void InsecureContentInfoBarDelegate::InfoBarDismissed() { |
| 52 UMA_HISTOGRAM_ENUMERATION("InsecureContentInfoBarDelegateV2", | 56 UMA_HISTOGRAM_ENUMERATION("InsecureContentInfoBarDelegateV2", |
| 53 DISPLAY_INFOBAR_DISMISSED, NUM_EVENTS); | 57 DISPLAY_INFOBAR_DISMISSED, NUM_EVENTS); |
| 54 ConfirmInfoBarDelegate::InfoBarDismissed(); | 58 ConfirmInfoBarDelegate::InfoBarDismissed(); |
| 55 } | 59 } |
| 56 | 60 |
| 57 InsecureContentInfoBarDelegate* | 61 InsecureContentInfoBarDelegate* |
| 58 InsecureContentInfoBarDelegate::AsInsecureContentInfoBarDelegate() { | 62 InsecureContentInfoBarDelegate::AsInsecureContentInfoBarDelegate() { |
| 59 return this; | 63 return this; |
| 60 } | 64 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return true; | 97 return true; |
| 94 } | 98 } |
| 95 | 99 |
| 96 base::string16 InsecureContentInfoBarDelegate::GetLinkText() const { | 100 base::string16 InsecureContentInfoBarDelegate::GetLinkText() const { |
| 97 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 101 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
| 98 } | 102 } |
| 99 | 103 |
| 100 GURL InsecureContentInfoBarDelegate::GetLinkURL() const { | 104 GURL InsecureContentInfoBarDelegate::GetLinkURL() const { |
| 101 return GURL("https://support.google.com/chrome/answer/1342714"); | 105 return GURL("https://support.google.com/chrome/answer/1342714"); |
| 102 } | 106 } |
| OLD | NEW |