summaryrefslogtreecommitdiff
path: root/chromium/content/browser/frame_host
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/frame_host')
-rw-r--r--chromium/content/browser/frame_host/navigation_handle_impl.cc8
-rw-r--r--chromium/content/browser/frame_host/navigation_request.cc16
-rw-r--r--chromium/content/browser/frame_host/navigation_request.h4
3 files changed, 28 insertions, 0 deletions
diff --git a/chromium/content/browser/frame_host/navigation_handle_impl.cc b/chromium/content/browser/frame_host/navigation_handle_impl.cc
index 50ee263651f..3b11c0e1abe 100644
--- a/chromium/content/browser/frame_host/navigation_handle_impl.cc
+++ b/chromium/content/browser/frame_host/navigation_handle_impl.cc
@@ -450,6 +450,7 @@ void NavigationHandleImpl::InitServiceWorkerHandle(
}
void NavigationHandleImpl::RenderProcessBlockedStateChanged(bool blocked) {
+ AddNetworkServiceDebugEvent(std::string("B") + (blocked ? "1" : "0"));
if (blocked)
StopCommitTimeout();
else
@@ -484,6 +485,7 @@ void NavigationHandleImpl::RestartCommitTimeout() {
void NavigationHandleImpl::OnCommitTimeout() {
DCHECK_EQ(NavigationRequest::READY_TO_COMMIT, state());
+ AddNetworkServiceDebugEvent("T");
#if defined(OS_ANDROID)
// Rate limit the number of stack dumps so we don't overwhelm our crash
// reports.
@@ -510,6 +512,12 @@ void NavigationHandleImpl::OnCommitTimeout() {
base::debug::ScopedCrashKeyString scoped_memory(
memory_key,
base::NumberToString(base::SysInfo::AmountOfPhysicalMemoryMB()));
+
+ static base::debug::CrashKeyString* debug_string_key =
+ base::debug::AllocateCrashKeyString("ns_debug_events",
+ base::debug::CrashKeySize::Size256);
+ base::debug::ScopedCrashKeyString scoped_debug_string(
+ debug_string_key, GetNetworkServiceDebugEventsString());
base::debug::DumpWithoutCrashing();
if (IsOutOfProcessNetworkService())
diff --git a/chromium/content/browser/frame_host/navigation_request.cc b/chromium/content/browser/frame_host/navigation_request.cc
index 4bb7b470e7f..8175ccc7dc7 100644
--- a/chromium/content/browser/frame_host/navigation_request.cc
+++ b/chromium/content/browser/frame_host/navigation_request.cc
@@ -2048,6 +2048,8 @@ void NavigationRequest::CommitNavigation() {
commit_params_.prefetched_signed_exchanges =
std::move(subresource_loader_params_->prefetched_signed_exchanges);
}
+
+ AddNetworkServiceDebugEvent("COM");
render_frame_host_->CommitNavigation(
this, common_params_, commit_params_, response_head_.get(),
std::move(response_body_), std::move(url_loader_client_endpoints_),
@@ -2107,6 +2109,16 @@ void NavigationRequest::RenderProcessHostDestroyed(RenderProcessHost* host) {
ResetExpectedProcess();
}
+void NavigationRequest::RenderProcessReady(RenderProcessHost* host) {
+ AddNetworkServiceDebugEvent("RPR");
+}
+
+void NavigationRequest::RenderProcessExited(
+ RenderProcessHost* host,
+ const ChildProcessTerminationInfo& info) {
+ AddNetworkServiceDebugEvent("RPE");
+}
+
void NavigationRequest::UpdateSiteURL(
RenderProcessHost* post_redirect_process) {
GURL new_site_url = GetSiteForCommonParamsURL();
@@ -2729,6 +2741,7 @@ void NavigationRequest::DidCommitNavigation(
bool did_replace_entry,
const GURL& previous_url,
NavigationType navigation_type) {
+ AddNetworkServiceDebugEvent("DCN");
common_params_.url = params.url;
did_replace_entry_ = did_replace_entry;
should_update_history_ = params.should_update_history;
@@ -2847,6 +2860,9 @@ void NavigationRequest::ReadyToCommitNavigation(bool is_error) {
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationHandle", this,
"ReadyToCommitNavigation");
+ AddNetworkServiceDebugEvent(
+ std::string("RTCN") +
+ (render_frame_host_->GetProcess()->IsReady() ? "1" : "0"));
handle_state_ = READY_TO_COMMIT;
ready_to_commit_time_ = base::TimeTicks::Now();
navigation_handle_->RestartCommitTimeout();
diff --git a/chromium/content/browser/frame_host/navigation_request.h b/chromium/content/browser/frame_host/navigation_request.h
index 67c95139821..92c2c4fba60 100644
--- a/chromium/content/browser/frame_host/navigation_request.h
+++ b/chromium/content/browser/frame_host/navigation_request.h
@@ -19,6 +19,7 @@
#include "content/browser/initiator_csp_context.h"
#include "content/browser/loader/navigation_url_loader_delegate.h"
#include "content/browser/navigation_subresource_loader_params.h"
+#include "content/browser/network_service_instance_impl.h"
#include "content/browser/web_package/bundled_exchanges_factory.h"
#include "content/common/content_export.h"
#include "content/common/frame_message_enums.h"
@@ -688,6 +689,9 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate,
bool IsSelfReferentialURL();
// RenderProcessHostObserver implementation.
+ void RenderProcessReady(RenderProcessHost* host) override;
+ void RenderProcessExited(RenderProcessHost* host,
+ const ChildProcessTerminationInfo& info) override;
void RenderProcessHostDestroyed(RenderProcessHost* host) override;
void RecordNavigationMetrics() const;