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

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

Issue 2800213002: Avoid duplicate functions/code in core/inspector.
Patch Set: A third way 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/InspectorHelpers.cpp
diff --git a/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp b/third_party/WebKit/Source/core/inspector/InspectorHelpers.cpp
similarity index 71%
rename from third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp
rename to third_party/WebKit/Source/core/inspector/InspectorHelpers.cpp
index 2c59eba0996ab6261872b1e3c44ad80b77f78606..ca227b9fa53ffc7a57512233e4d70c35beab5a8f 100644
--- a/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorHelpers.cpp
@@ -2,8 +2,9 @@
// 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 "core/inspector/InspectorHelpers.h"
+#include "core/inspector/IdentifiersFactory.h"
#include "platform/wtf/text/WTFString.h"
#include "public/platform/WebCrypto.h"
@@ -15,4 +16,10 @@ void AddStringToDigestor(WebCryptoDigestor* digestor, const String& string) {
c_string.length());
}
+KURL UrlWithoutFragment(const KURL& url) {
+ KURL result = url;
pfeldman 2017/07/21 18:10:59 ditto
Daniel Bratell 2017/07/23 20:14:12 Inline result? There is a non-const destructive fu
pfeldman 2017/07/25 00:14:43 Inline entire method: KURL nofragment = url; nofr
+ result.RemoveFragmentIdentifier();
+ return result;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698