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

Unified Diff: net/tools/transport_security_state_generator/spki_hash.cc

Issue 2793823002: Add unittests for certificate and file parsing. (Closed)
Patch Set: comments davidben Created 3 years, 8 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/spki_hash.cc
diff --git a/net/tools/transport_security_state_generator/spki_hash.cc b/net/tools/transport_security_state_generator/spki_hash.cc
index a6986fc975bee6dafb57ce8b07e78dc6e82de90b..e7914c3227dd7fed38768da5ce971a1fe43ec8dd 100644
--- a/net/tools/transport_security_state_generator/spki_hash.cc
+++ b/net/tools/transport_security_state_generator/spki_hash.cc
@@ -19,8 +19,8 @@ SPKIHash::SPKIHash() {}
SPKIHash::~SPKIHash() {}
-bool SPKIHash::FromString(const std::string& hash_string) {
- std::string base64_string;
+bool SPKIHash::FromString(base::StringPiece hash_string) {
+ base::StringPiece base64_string;
if (!base::StartsWith(hash_string, "sha256/",
base::CompareCase::INSENSITIVE_ASCII)) {

Powered by Google App Engine
This is Rietveld 408576698