    }
  
    if (signin::ShouldShowPromoAtStartup(profile_, is_first_run_)) {
---- a/chrome/browser/ui/views/frame/browser_view.cc
-+++ b/chrome/browser/ui/views/frame/browser_view.cc
-@@ -14,6 +14,7 @@
- #include "base/prefs/pref_service.h"
- #include "base/profiler/scoped_tracker.h"
- #include "base/strings/string_number_conversions.h"
-+#include "base/strings/utf_string_conversions.h"
- #include "chrome/app/chrome_command_ids.h"
- #include "chrome/app/chrome_dll_resource.h"
- #include "chrome/browser/app_mode/app_mode_utils.h"
-@@ -140,6 +141,7 @@
- #include "ui/views/widget/root_view.h"
- #include "ui/views/widget/widget.h"
- #include "ui/views/window/dialog_delegate.h"
-+#include "components/app_modal/app_modal_dialog.h"
- 
- #if defined(USE_AURA)
- #include "ui/aura/client/window_tree_client.h"
-@@ -1280,6 +1282,19 @@
-   return SessionCrashedBubbleView::Show(browser_.get());
- }
- 
-+void BrowserView::show_trace_alert(const GURL &url)
-+{
-+	auto wc = GetActiveWebContents();
-+	if (wc == NULL)
-+		return;
-+	auto mf = wc->GetMainFrame();
-+	if (mf == NULL)
-+		return;
-+	std::string s = "alert(\"Attempt at loading traced URL:\\n " +
-+	                url.spec() + "\");";
-+	mf->ExecuteJavaScript(base::ASCIIToUTF16(s.c_str()));
-+}
-+
- bool BrowserView::IsProfileResetBubbleSupported() const {
-   return true;
- }
---- a/chrome/browser/ui/views/frame/browser_view.h
-+++ b/chrome/browser/ui/views/frame/browser_view.h
-@@ -315,6 +315,7 @@
-                            translate::TranslateErrors::Type error_type,
-                            bool is_user_gesture) override;
-   bool ShowSessionCrashedBubble() override;
-+  void show_trace_alert(const GURL &);
-   bool IsProfileResetBubbleSupported() const override;
-   GlobalErrorBubbleViewBase* ShowProfileResetBubble(
-       const base::WeakPtr<ProfileResetGlobalError>& global_error) override;
 --- a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc
 +++ b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc
 @@ -42,7 +42,7 @@

     return entry->GetURL().SchemeIs(content::kChromeUIScheme);
 
   return false;
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -11,6 +11,7 @@
 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "content/public/browser/navigation_controller.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
 
 using content::WebContents;
 
@@ -139,6 +140,19 @@
   return FindBrowserWithTabbedOrAnyType(profile, desktop_type, false, false);
 }
 
+void ui_show_trace_alert(const GURL &url)
+{
+	for (BrowserIterator i; !i.done(); i.Next()) {
+		Browser *b = *i;
+		if (b == NULL)
+			continue;
+		auto bv = BrowserView::GetBrowserViewForBrowser(b);
+		if (bv == NULL)
+			continue;
+		bv->show_trace_alert(url);
+	}
+}
+
 Browser* FindBrowserWithID(SessionID::id_type desired_id) {
   for (BrowserIterator it; !it.done(); it.Next()) {
     if (it->session_id().id() == desired_id)
--- a/chrome/browser/ui/browser_finder.h
+++ b/chrome/browser/ui/browser_finder.h
@@ -92,6 +92,8 @@
 // desktop defined by |type|.
 size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type);
 
+extern void ui_show_trace_alert(const GURL &);
+
 }  // namespace chrome
 
 #endif  // CHROME_BROWSER_UI_BROWSER_FINDER_H_
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -732,6 +732,14 @@

 
 namespace net {
 
+void (*trace_urlreq_cb)(const std::string &, const GURL &);
+
 namespace {
 
 // Max number of http redirects to follow.  Same number as gecko.
@@ -552,6 +554,11 @@
   DCHECK(base::MessageLoop::current())
       << "The current base::MessageLoop must exist";
 
+	if (trace_urlreq_cb != NULL)
+		(*trace_urlreq_cb)("URLRequest", url);
+	if (url.scheme() == url::kTraceScheme)
+		url_chain_[0] = url.strip_trk();
+
   context->url_requests()->insert(this);
   net_log_.BeginEvent(NetLog::TYPE_REQUEST_ALIVE);
