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

Side by Side Diff: net/cert/internal/cert_errors.cc

Issue 2341803002: Remove CertErrors::Add(); use CertErrors::AddError() instead. (Closed)
Patch Set: Created 4 years, 3 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 | « net/cert/internal/cert_errors.h ('k') | net/cert/internal/signature_policy.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 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
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
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
OLDNEW
« no previous file with comments | « net/cert/internal/cert_errors.h ('k') | net/cert/internal/signature_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698