| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/ssl/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.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 "base/string_piece.h" | 10 #include "base/string_piece.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 enum SSLBlockingPageEvent { | 30 enum SSLBlockingPageEvent { |
| 31 SHOW, | 31 SHOW, |
| 32 PROCEED, | 32 PROCEED, |
| 33 DONT_PROCEED, | 33 DONT_PROCEED, |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 void RecordSSLBlockingPageStats(SSLBlockingPageEvent event) { | 36 void RecordSSLBlockingPageStats(SSLBlockingPageEvent event) { |
| 37 static LinearHistogram histogram("interstial.ssl", 0, 2, 3); | 37 static scoped_refptr<Histogram> histogram = |
| 38 histogram.SetFlags(kUmaTargetedHistogramFlag); | 38 LinearHistogram::LinearHistogramFactoryGet( |
| 39 histogram.Add(event); | 39 "interstial.ssl", 1, 2, 3); |
| 40 histogram->SetFlags(kUmaTargetedHistogramFlag); |
| 41 histogram->Add(event); |
| 40 } | 42 } |
| 41 | 43 |
| 42 } // namespace | 44 } // namespace |
| 43 | 45 |
| 44 // Note that we always create a navigation entry with SSL errors. | 46 // Note that we always create a navigation entry with SSL errors. |
| 45 // No error happening loading a sub-resource triggers an interstitial so far. | 47 // No error happening loading a sub-resource triggers an interstitial so far. |
| 46 SSLBlockingPage::SSLBlockingPage(SSLCertErrorHandler* handler, | 48 SSLBlockingPage::SSLBlockingPage(SSLCertErrorHandler* handler, |
| 47 Delegate* delegate) | 49 Delegate* delegate) |
| 48 : InterstitialPage(handler->GetTabContents(), true, handler->request_url()), | 50 : InterstitialPage(handler->GetTabContents(), true, handler->request_url()), |
| 49 handler_(handler), | 51 handler_(handler), |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5" | 154 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5" |
| 153 }; | 155 }; |
| 154 int i; | 156 int i; |
| 155 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { | 157 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { |
| 156 strings->SetString(keys[i], extra_info[i]); | 158 strings->SetString(keys[i], extra_info[i]); |
| 157 } | 159 } |
| 158 for (;i < 5; i++) { | 160 for (;i < 5; i++) { |
| 159 strings->SetString(keys[i], L""); | 161 strings->SetString(keys[i], L""); |
| 160 } | 162 } |
| 161 } | 163 } |
| OLD | NEW |