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

Unified Diff: mojo/services/tracing/public/cpp/tracing_impl.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 | « mojo/services/tracing/public/cpp/tracing_impl.h ('k') | mojo/shell/application_manager_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/tracing/public/cpp/tracing_impl.cc
diff --git a/mojo/services/tracing/public/cpp/tracing_impl.cc b/mojo/services/tracing/public/cpp/tracing_impl.cc
index b0fd15497e4a59aac91347b850d668ff293ad53d..04cd7d15399b0b23276b0c13f8461c832f3521e8 100644
--- a/mojo/services/tracing/public/cpp/tracing_impl.cc
+++ b/mojo/services/tracing/public/cpp/tracing_impl.cc
@@ -10,7 +10,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h"
#include "base/trace_event/trace_event_impl.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
#ifdef NDEBUG
#include "base/command_line.h"
@@ -41,7 +41,7 @@ TracingImpl::TracingImpl() {
TracingImpl::~TracingImpl() {
}
-void TracingImpl::Initialize(ApplicationImpl* app) {
+void TracingImpl::Initialize(Shell* shell, const std::string& url) {
{
base::AutoLock lock(g_singleton_lock.Get());
if (g_tracing_singleton_created)
@@ -51,9 +51,9 @@ void TracingImpl::Initialize(ApplicationImpl* app) {
// This will only set the name for the first app in a loaded mojo file. It's
// up to something like CoreServices to name its own child threads.
- base::PlatformThread::SetName(app->url());
+ base::PlatformThread::SetName(url);
- connection_ = app->ConnectToApplication("mojo:tracing");
+ connection_ = shell->ConnectToApplication("mojo:tracing");
connection_->AddService(this);
#ifdef NDEBUG
« no previous file with comments | « mojo/services/tracing/public/cpp/tracing_impl.h ('k') | mojo/shell/application_manager_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698