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

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

Issue 2906633003: Add a build flag to configure bundling of HSTS preload list (Closed)
Patch Set: change flag to INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST Created 3 years, 6 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);
Ryan Sleevi 2017/06/29 20:47:40 This API seems pretty heavy weight - both from per
xunjieli 2017/06/30 19:12:18 Done.
+
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