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

Side by Side Diff: net/http/transport_security_state.cc

Issue 2120683002: Fix up certificate error reporting histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused ios certificate_reporting dependency Created 4 years, 5 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
« no previous file with comments | « ios/chrome/ios_chrome.gyp ('k') | net/http/transport_security_state_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/http/transport_security_state.h" 5 #include "net/http/transport_security_state.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return memcmp(lhs.data, rhs.data(), rhs.size()) < 0; 62 return memcmp(lhs.data, rhs.data(), rhs.size()) < 0;
63 } 63 }
64 64
65 bool operator()(const HashValue& lhs, const SHA256HashValue& rhs) const { 65 bool operator()(const HashValue& lhs, const SHA256HashValue& rhs) const {
66 DCHECK_EQ(HASH_VALUE_SHA256, lhs.tag); 66 DCHECK_EQ(HASH_VALUE_SHA256, lhs.tag);
67 return memcmp(lhs.data(), rhs.data, lhs.size()) < 0; 67 return memcmp(lhs.data(), rhs.data, lhs.size()) < 0;
68 } 68 }
69 }; 69 };
70 70
71 void RecordUMAForHPKPReportFailure(const GURL& report_uri, int net_error) { 71 void RecordUMAForHPKPReportFailure(const GURL& report_uri, int net_error) {
72 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.PublicKeyPinReportSendingFailure", 72 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.PublicKeyPinReportSendingFailure2",
73 net_error); 73 -net_error);
74 } 74 }
75 75
76 std::string TimeToISO8601(const base::Time& t) { 76 std::string TimeToISO8601(const base::Time& t) {
77 base::Time::Exploded exploded; 77 base::Time::Exploded exploded;
78 t.UTCExplode(&exploded); 78 t.UTCExplode(&exploded);
79 return base::StringPrintf( 79 return base::StringPrintf(
80 "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", exploded.year, exploded.month, 80 "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", exploded.year, exploded.month,
81 exploded.day_of_month, exploded.hour, exploded.minute, exploded.second, 81 exploded.day_of_month, exploded.hour, exploded.minute, exploded.second,
82 exploded.millisecond); 82 exploded.millisecond);
83 } 83 }
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 TransportSecurityState::PKPStateIterator::PKPStateIterator( 1521 TransportSecurityState::PKPStateIterator::PKPStateIterator(
1522 const TransportSecurityState& state) 1522 const TransportSecurityState& state)
1523 : iterator_(state.enabled_pkp_hosts_.begin()), 1523 : iterator_(state.enabled_pkp_hosts_.begin()),
1524 end_(state.enabled_pkp_hosts_.end()) { 1524 end_(state.enabled_pkp_hosts_.end()) {
1525 } 1525 }
1526 1526
1527 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { 1527 TransportSecurityState::PKPStateIterator::~PKPStateIterator() {
1528 } 1528 }
1529 1529
1530 } // namespace 1530 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/ios_chrome.gyp ('k') | net/http/transport_security_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698