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

Unified Diff: third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp

Issue 2800133003: Avoid duplicate functions: one AddStringToDigestor is enough (Closed)
Patch Set: Avoid duplicate functions/code: one AddStringToDigestor is enough. Created 3 years, 5 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: third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp
diff --git a/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp b/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..96fd29fc412eb21c533019305b9cd5e8f7c795cd
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp
@@ -0,0 +1,17 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/inspector/AddStringToDigestor.h"
+
+#include "platform/wtf/text/WTFString.h"
+#include "public/platform/WebCrypto.h"
+
+namespace blink {
+
+void AddStringToDigestor(WebCryptoDigestor* digestor, const String& string) {
+ digestor->Consume(
+ reinterpret_cast<const unsigned char*>(string.Ascii().data()),
alph 2017/07/08 01:16:24 I bet string.Ascii().length() is not equal to stri
Daniel Bratell 2017/07/10 14:47:18 So thanks to your review I realized that the two f
alph 2017/07/10 21:26:06 I believe it's not really important which encoding
+ string.length());
+}
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698