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

Side by Side Diff: components/html_viewer/stats_collection_controller.cc

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
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 unified diff | Download patch
« no previous file with comments | « components/html_viewer/layout_test_html_viewer.cc ('k') | components/mus/mus_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/html_viewer/stats_collection_controller.h" 5 #include "components/html_viewer/stats_collection_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 v8::Isolate* isolate = blink::mainThreadIsolate(); 77 v8::Isolate* isolate = blink::mainThreadIsolate();
78 v8::HandleScope handle_scope(isolate); 78 v8::HandleScope handle_scope(isolate);
79 v8::Local<v8::Context> context = frame->mainWorldScriptContext(); 79 v8::Local<v8::Context> context = frame->mainWorldScriptContext();
80 if (context.IsEmpty()) 80 if (context.IsEmpty())
81 return nullptr; 81 return nullptr;
82 82
83 v8::Context::Scope context_scope(context); 83 v8::Context::Scope context_scope(context);
84 84
85 scoped_ptr<mojo::ApplicationConnection> connection = 85 scoped_ptr<mojo::Connection> connection =
86 shell->ConnectToApplication("mojo:tracing"); 86 shell->ConnectToApplication("mojo:tracing");
87 if (!connection) 87 if (!connection)
88 return nullptr; 88 return nullptr;
89 tracing::StartupPerformanceDataCollectorPtr collector_for_controller; 89 tracing::StartupPerformanceDataCollectorPtr collector_for_controller;
90 tracing::StartupPerformanceDataCollectorPtr collector_for_caller; 90 tracing::StartupPerformanceDataCollectorPtr collector_for_caller;
91 connection->ConnectToService(&collector_for_controller); 91 connection->ConnectToService(&collector_for_controller);
92 connection->ConnectToService(&collector_for_caller); 92 connection->ConnectToService(&collector_for_caller);
93 93
94 gin::Handle<StatsCollectionController> controller = gin::CreateHandle( 94 gin::Handle<StatsCollectionController> controller = gin::CreateHandle(
95 isolate, 95 isolate,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 histogram->WriteJSON(&histogram_json); 153 histogram->WriteJSON(&histogram_json);
154 return histogram_json; 154 return histogram_json;
155 } 155 }
156 156
157 std::string StatsCollectionController::GetBrowserHistogram( 157 std::string StatsCollectionController::GetBrowserHistogram(
158 const std::string& histogram_name) { 158 const std::string& histogram_name) {
159 return GetHistogram(histogram_name); 159 return GetHistogram(histogram_name);
160 } 160 }
161 161
162 } // namespace html_viewer 162 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/layout_test_html_viewer.cc ('k') | components/mus/mus_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698