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

Unified Diff: net/tools/transport_security_state_generator/pinsets.h

Issue 2901393005: Experiment with HSTS preload list filtering. (Closed)
Patch Set: play.google.com is required too. Created 3 years, 7 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
Index: net/tools/transport_security_state_generator/pinsets.h
diff --git a/net/tools/transport_security_state_generator/pinsets.h b/net/tools/transport_security_state_generator/pinsets.h
index 76790307db4e2660901ba86c0d494b412ee432a3..1eec3e30711531bda6a131a9b3b88d8749c4ecf3 100644
--- a/net/tools/transport_security_state_generator/pinsets.h
+++ b/net/tools/transport_security_state_generator/pinsets.h
@@ -7,6 +7,7 @@
#include <map>
#include <memory>
+#include <set>
#include <string>
#include "base/macros.h"
@@ -32,6 +33,10 @@ class Pinsets {
void RegisterSPKIHash(base::StringPiece name, const SPKIHash& hash);
void RegisterPinset(std::unique_ptr<Pinset> set);
+ // Removes all Pinsets whose name is not in |except_these|. Also removes the
+ // SPKI Hashes that are no longer referenced by the remaining pinsets.
+ void FilterPinsets(const std::set<std::string>& except_these);
+
size_t size() const { return pinsets_.size(); }
size_t spki_size() const { return spki_hashes_.size(); }

Powered by Google App Engine
This is Rietveld 408576698