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

Unified Diff: net/cert/internal/path_builder.h

Issue 2759023002: Improvements to the net/cert/internal error handling. (Closed)
Patch Set: fix comment Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/internal/cert_errors.cc ('k') | net/cert/internal/path_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/path_builder.h
diff --git a/net/cert/internal/path_builder.h b/net/cert/internal/path_builder.h
index f942fd2921ffa131dc26248513fcbcfb92a27f12..d9d32fc9378bfffcd2a07dd2e3b4a973ff95cc4f 100644
--- a/net/cert/internal/path_builder.h
+++ b/net/cert/internal/path_builder.h
@@ -47,7 +47,7 @@ struct NET_EXPORT CertPath {
// Resets the path to empty path (same as if default constructed).
void Clear();
- // Returns true if the path is empty.
+ // TODO(eroman): Can we remove this? Unclear on how this relates to validity.
bool IsEmpty() const;
};
@@ -64,19 +64,17 @@ class NET_EXPORT CertPathBuilder {
ResultPath();
~ResultPath();
+ // Returns true if the candidate path is valid, false otherwise.
+ bool IsValid() const;
+
// The (possibly partial) certificate path. Consumers must always test
- // |valid| before using |path|. When |!valid| path.trust_anchor may be
- // nullptr, and the path may be otherwise incomplete/invalid.
+ // |errors.IsValid()| before using |path|. When invalid,
+ // |path.trust_anchor| may be null, and the path may be incomplete.
CertPath path;
- // The errors/warnings from this path. Note that the list of errors is
- // independent of whether the path was |valid| (a valid path may
- // contain errors/warnings, and vice versa an invalid path may not have
- // logged any errors).
- CertErrors errors;
-
- // True if |path| is a correct verified certificate chain.
- bool valid = false;
+ // The errors/warnings from this path. Use |IsValid()| to determine if the
+ // path is valid.
+ CertPathErrors errors;
};
// Provides the overall result of path building. This includes the paths that
« no previous file with comments | « net/cert/internal/cert_errors.cc ('k') | net/cert/internal/path_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698