OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/cert/internal/cert_errors.h" | 5 #include "net/cert/internal/cert_errors.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "net/cert/internal/cert_error_params.h" | 10 #include "net/cert/internal/cert_error_params.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 CertErrors::CertErrors() = default; | 89 CertErrors::CertErrors() = default; |
90 | 90 |
91 CertErrors::~CertErrors() = default; | 91 CertErrors::~CertErrors() = default; |
92 | 92 |
93 void CertErrors::Add(CertErrorNodeType node_type, | 93 void CertErrors::Add(CertErrorNodeType node_type, |
94 CertErrorId id, | 94 CertErrorId id, |
95 std::unique_ptr<CertErrorParams> params) { | 95 std::unique_ptr<CertErrorParams> params) { |
96 AddNode(base::MakeUnique<CertErrorNode>(node_type, id, std::move(params))); | 96 AddNode(base::MakeUnique<CertErrorNode>(node_type, id, std::move(params))); |
97 } | 97 } |
98 | 98 |
99 void CertErrors::Add(CertErrorId id) { | |
100 AddError(id); | |
101 } | |
102 | |
103 void CertErrors::AddError(CertErrorId id, | 99 void CertErrors::AddError(CertErrorId id, |
104 std::unique_ptr<CertErrorParams> params) { | 100 std::unique_ptr<CertErrorParams> params) { |
105 Add(CertErrorNodeType::TYPE_ERROR, id, std::move(params)); | 101 Add(CertErrorNodeType::TYPE_ERROR, id, std::move(params)); |
106 } | 102 } |
107 | 103 |
108 void CertErrors::AddError(CertErrorId id) { | 104 void CertErrors::AddError(CertErrorId id) { |
109 AddError(id, nullptr); | 105 AddError(id, nullptr); |
110 } | 106 } |
111 | 107 |
112 void CertErrors::AddWarning(CertErrorId id, | 108 void CertErrors::AddWarning(CertErrorId id, |
(...skipping 22 matching lines...) Expand all Loading... |
135 nodes_.push_back(std::move(node)); | 131 nodes_.push_back(std::move(node)); |
136 } | 132 } |
137 | 133 |
138 CertErrorScoper* CertErrors::SetScoper(CertErrorScoper* scoper) { | 134 CertErrorScoper* CertErrors::SetScoper(CertErrorScoper* scoper) { |
139 CertErrorScoper* prev = current_scoper_; | 135 CertErrorScoper* prev = current_scoper_; |
140 current_scoper_ = scoper; | 136 current_scoper_ = scoper; |
141 return prev; | 137 return prev; |
142 } | 138 } |
143 | 139 |
144 } // namespace net | 140 } // namespace net |
OLD | NEW |