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

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 515033: Cleanup histogram classes mixing SetFlags into FactoryGet arguments... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 12 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 | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 #include "chrome/common/pref_service.h" 24 #include "chrome/common/pref_service.h"
25 #include "grit/browser_resources.h" 25 #include "grit/browser_resources.h"
26 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
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 UNUSED_ENUM,
34 }; 35 };
35 36
36 void RecordSSLBlockingPageStats(SSLBlockingPageEvent event) { 37 void RecordSSLBlockingPageStats(SSLBlockingPageEvent event) {
37 static scoped_refptr<Histogram> histogram = 38 UMA_HISTOGRAM_ENUMERATION("interstial.ssl", event, UNUSED_ENUM);
38 LinearHistogram::LinearHistogramFactoryGet(
39 "interstial.ssl", 1, 2, 3);
40 histogram->SetFlags(kUmaTargetedHistogramFlag);
41 histogram->Add(event);
42 } 39 }
43 40
44 } // namespace 41 } // namespace
45 42
46 // Note that we always create a navigation entry with SSL errors. 43 // Note that we always create a navigation entry with SSL errors.
47 // No error happening loading a sub-resource triggers an interstitial so far. 44 // No error happening loading a sub-resource triggers an interstitial so far.
48 SSLBlockingPage::SSLBlockingPage(SSLCertErrorHandler* handler, 45 SSLBlockingPage::SSLBlockingPage(SSLCertErrorHandler* handler,
49 Delegate* delegate) 46 Delegate* delegate)
50 : InterstitialPage(handler->GetTabContents(), true, handler->request_url()), 47 : InterstitialPage(handler->GetTabContents(), true, handler->request_url()),
51 handler_(handler), 48 handler_(handler),
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5" 151 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5"
155 }; 152 };
156 int i; 153 int i;
157 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { 154 for (i = 0; i < static_cast<int>(extra_info.size()); i++) {
158 strings->SetString(keys[i], extra_info[i]); 155 strings->SetString(keys[i], extra_info[i]);
159 } 156 }
160 for (;i < 5; i++) { 157 for (;i < 5; i++) {
161 strings->SetString(keys[i], L""); 158 strings->SetString(keys[i], L"");
162 } 159 }
163 } 160 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698