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

Unified Diff: mojo/application/content_handler_factory.cc

Issue 1272573005: Add more tracing for content handlers. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | services/dart/content_handler_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/content_handler_factory.cc
diff --git a/mojo/application/content_handler_factory.cc b/mojo/application/content_handler_factory.cc
index d260b23b9028444ad8e011bf6b107e0c379b3e5e..12310015d05d4261e5372cbc8120c92d9caf2801 100644
--- a/mojo/application/content_handler_factory.cc
+++ b/mojo/application/content_handler_factory.cc
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/platform_thread.h"
+#include "base/trace_event/trace_event.h"
#include "mojo/application/application_runner_chromium.h"
#include "mojo/common/message_pump_mojo.h"
#include "mojo/public/cpp/application/application_connection.h"
@@ -40,6 +41,8 @@ class ApplicationThread : public base::PlatformThread::Delegate {
private:
void ThreadMain() override {
+ TRACE_EVENT_INSTANT1("content_handler", "ThreadMain()",
+ TRACE_EVENT_SCOPE_THREAD, "url", response_->url.get());
base::PlatformThread::SetName(response_->url);
handler_delegate_->RunApplication(application_request_.Pass(),
response_.Pass());
@@ -79,6 +82,8 @@ class ContentHandlerImpl : public ContentHandler {
// Overridden from ContentHandler:
void StartApplication(InterfaceRequest<Application> application_request,
URLResponsePtr response) override {
+ TRACE_EVENT_INSTANT1("content_handler", "StartApplication()",
+ TRACE_EVENT_SCOPE_THREAD, "url", response->url.get());
ApplicationThread* thread = new ApplicationThread(
base::ThreadTaskRunnerHandle::Get(),
base::Bind(&ContentHandlerImpl::OnThreadEnd,
« no previous file with comments | « no previous file | services/dart/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698