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

Unified Diff: chrome/renderer/page_load_histograms.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: chrome/renderer/page_load_histograms.cc
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc
index 672875aad602782bc4ddec52f3422523eba73e39..f4604394a697954e99efc32240d4c38fec2020ea 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -31,6 +31,7 @@
#include "extensions/common/url_pattern.h"
#include "net/base/url_util.h"
#include "net/http/http_response_headers.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -910,14 +911,14 @@ void PageLoadHistograms::Dump(WebFrame* frame) {
DCHECK(handled || !data_reduction_proxy_was_used);
}
- bool came_from_websearch =
- IsFromGoogleSearchResult(frame->document().url(),
- GURL(frame->document().referrer()));
+ bool came_from_websearch = IsFromGoogleSearchResult(
+ frame->document().url(),
+ blink::WebStringToGURL(frame->document().referrer()));
int websearch_chrome_joint_experiment_id = kNoExperiment;
bool is_preview = false;
if (came_from_websearch) {
- websearch_chrome_joint_experiment_id =
- GetQueryStringBasedExperiment(GURL(frame->document().referrer()));
+ websearch_chrome_joint_experiment_id = GetQueryStringBasedExperiment(
+ blink::WebStringToGURL(frame->document().referrer()));
is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview");
}
« no previous file with comments | « chrome/renderer/extensions/resource_request_policy.cc ('k') | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698