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

Unified Diff: components/html_viewer/stats_collection_controller.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
Index: components/html_viewer/stats_collection_controller.cc
diff --git a/components/html_viewer/stats_collection_controller.cc b/components/html_viewer/stats_collection_controller.cc
index aede2bd37ae031a2500713c8e1f856eb1df9cc15..e6cdf5c3ec252fc1fbc2786c34ffa59e550c43bb 100644
--- a/components/html_viewer/stats_collection_controller.cc
+++ b/components/html_viewer/stats_collection_controller.cc
@@ -15,7 +15,7 @@
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "mojo/services/tracing/public/cpp/switches.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -66,9 +66,9 @@ gin::WrapperInfo StatsCollectionController::kWrapperInfo = {
// static
tracing::StartupPerformanceDataCollectorPtr StatsCollectionController::Install(
blink::WebFrame* frame,
- mojo::ApplicationImpl* app) {
+ mojo::Shell* shell) {
// Only make startup tracing available when running in the context of a test.
- if (!app ||
+ if (!shell ||
!base::CommandLine::ForCurrentProcess()->HasSwitch(
tracing::kEnableStatsCollectionBindings)) {
return nullptr;
@@ -83,7 +83,7 @@ tracing::StartupPerformanceDataCollectorPtr StatsCollectionController::Install(
v8::Context::Scope context_scope(context);
scoped_ptr<mojo::ApplicationConnection> connection =
- app->ConnectToApplication("mojo:tracing");
+ shell->ConnectToApplication("mojo:tracing");
if (!connection)
return nullptr;
tracing::StartupPerformanceDataCollectorPtr collector_for_controller;
@@ -103,16 +103,16 @@ tracing::StartupPerformanceDataCollectorPtr StatsCollectionController::Install(
// static
tracing::StartupPerformanceDataCollectorPtr
-StatsCollectionController::ConnectToDataCollector(mojo::ApplicationImpl* app) {
+StatsCollectionController::ConnectToDataCollector(mojo::Shell* shell) {
// Only make startup tracing available when running in the context of a test.
- if (!app ||
+ if (!shell ||
!base::CommandLine::ForCurrentProcess()->HasSwitch(
tracing::kEnableStatsCollectionBindings)) {
return nullptr;
}
tracing::StartupPerformanceDataCollectorPtr collector;
- app->ConnectToService("mojo:tracing", &collector);
+ shell->ConnectToService("mojo:tracing", &collector);
return collector;
}

Powered by Google App Engine
This is Rietveld 408576698