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

Unified Diff: chrome/browser/net/predictor.cc

Issue 2907263002: [Not for review] Add TRACE_EVENTs and chrome://flags for preconnect
Patch Set: Created 3 years, 7 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
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | chrome/browser/net/predictor_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.cc
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index 5d73b277c1d45cc6ef19e618cbbd8d52a8f2c0b9..7b020d6a3c1de5f35fc2d9424195ddf7f9a8f6b9 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -27,6 +27,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/prefs/session_startup_pref.h"
@@ -760,7 +761,8 @@ void Predictor::PreconnectUrlOnIOThread(
if (!profile_io_data_)
return;
-
+ TRACE_EVENT2("net", "Predictor::PreconnectUrlOnIOThread", "url",
+ original_url.spec(), "motivation", static_cast<int>(motivation));
// Translate the motivation from UrlRequest motivations to HttpRequest
// motivations.
net::HttpRequestInfo::RequestMotivation request_motivation =
@@ -839,6 +841,8 @@ enum SubresourceValue {
void Predictor::PrepareFrameSubresources(const GURL& original_url,
const GURL& first_party_for_cookies) {
+ TRACE_EVENT1("net", "Predictor::PrepareFrameSubresources", "url",
+ original_url.spec());
// Apply HSTS redirect early so it is taken into account when looking up
// subresources.
GURL url = GetHSTSRedirectOnIOThread(original_url);
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | chrome/browser/net/predictor_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698