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/blocked_infobar_delegate.h" | 5 #include "chrome/browser/tab_contents/blocked_infobar_delegate.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 bool BlockedDisplayingInfoBarDelegate::Accept() { | 97 bool BlockedDisplayingInfoBarDelegate::Accept() { |
98 UMA_HISTOGRAM_ENUMERATION("MixedContent.DisplayingInfoBar", | 98 UMA_HISTOGRAM_ENUMERATION("MixedContent.DisplayingInfoBar", |
99 BLOCKED_INFOBAR_EVENT_ALLOWED, | 99 BLOCKED_INFOBAR_EVENT_ALLOWED, |
100 BLOCKED_INFOBAR_EVENT_LAST); | 100 BLOCKED_INFOBAR_EVENT_LAST); |
101 wrapper()->Send(new ViewMsg_SetAllowDisplayingInsecureContent( | 101 wrapper()->Send(new ViewMsg_SetAllowDisplayingInsecureContent( |
102 wrapper()->routing_id(), true)); | 102 wrapper()->routing_id(), true)); |
103 return true; | 103 return true; |
104 } | 104 } |
105 | 105 |
| 106 bool BlockedDisplayingInfoBarDelegate::Cancel() { |
| 107 UMA_HISTOGRAM_ENUMERATION("MixedContent.DisplayingInfoBar", |
| 108 BLOCKED_INFOBAR_EVENT_CANCELLED, |
| 109 BLOCKED_INFOBAR_EVENT_LAST); |
| 110 return true; |
| 111 } |
| 112 |
| 113 |
106 BlockedRunningInfoBarDelegate::BlockedRunningInfoBarDelegate( | 114 BlockedRunningInfoBarDelegate::BlockedRunningInfoBarDelegate( |
107 TabContentsWrapper* wrapper) | 115 TabContentsWrapper* wrapper) |
108 : BlockedInfoBarDelegate( | 116 : BlockedInfoBarDelegate( |
109 wrapper, | 117 wrapper, |
110 IDS_BLOCKED_RUNNING_INSECURE_CONTENT, | 118 IDS_BLOCKED_RUNNING_INSECURE_CONTENT, |
111 IDS_ALLOW_INSECURE_CONTENT_BUTTON, | 119 IDS_ALLOW_INSECURE_CONTENT_BUTTON, |
112 GURL(kRunningLearnMoreURL)) { | 120 GURL(kRunningLearnMoreURL)) { |
113 UMA_HISTOGRAM_ENUMERATION("MixedContent.RunningInfoBar", | 121 UMA_HISTOGRAM_ENUMERATION("MixedContent.RunningInfoBar", |
114 BLOCKED_INFOBAR_EVENT_SHOWN, | 122 BLOCKED_INFOBAR_EVENT_SHOWN, |
115 BLOCKED_INFOBAR_EVENT_LAST); | 123 BLOCKED_INFOBAR_EVENT_LAST); |
(...skipping 13 matching lines...) Expand all Loading... |
129 | 137 |
130 bool BlockedRunningInfoBarDelegate::Accept() { | 138 bool BlockedRunningInfoBarDelegate::Accept() { |
131 UMA_HISTOGRAM_ENUMERATION("MixedContent.RunningInfoBar", | 139 UMA_HISTOGRAM_ENUMERATION("MixedContent.RunningInfoBar", |
132 BLOCKED_INFOBAR_EVENT_ALLOWED, | 140 BLOCKED_INFOBAR_EVENT_ALLOWED, |
133 BLOCKED_INFOBAR_EVENT_LAST); | 141 BLOCKED_INFOBAR_EVENT_LAST); |
134 wrapper()->Send(new ViewMsg_SetAllowRunningInsecureContent( | 142 wrapper()->Send(new ViewMsg_SetAllowRunningInsecureContent( |
135 wrapper()->routing_id(), true)); | 143 wrapper()->routing_id(), true)); |
136 return true; | 144 return true; |
137 } | 145 } |
138 | 146 |
| 147 bool BlockedRunningInfoBarDelegate::Cancel() { |
| 148 UMA_HISTOGRAM_ENUMERATION("MixedContent.RunningInfoBar", |
| 149 BLOCKED_INFOBAR_EVENT_CANCELLED, |
| 150 BLOCKED_INFOBAR_EVENT_LAST); |
| 151 return true; |
| 152 } |
| 153 |
OLD | NEW |