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

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

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
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/html_viewer.cc ('k') | components/mus/mus_app.cc » ('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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::Connection> connection = shell->Connect("mojo:tracing"); 85 scoped_ptr<mojo::Connection> connection = shell->Connect("mojo:tracing");
86 if (!connection) 86 if (!connection)
87 return nullptr; 87 return nullptr;
88 tracing::StartupPerformanceDataCollectorPtr collector_for_controller; 88 tracing::StartupPerformanceDataCollectorPtr collector_for_controller;
89 tracing::StartupPerformanceDataCollectorPtr collector_for_caller; 89 tracing::StartupPerformanceDataCollectorPtr collector_for_caller;
90 connection->ConnectToService(&collector_for_controller); 90 connection->GetInterface(&collector_for_controller);
91 connection->ConnectToService(&collector_for_caller); 91 connection->GetInterface(&collector_for_caller);
92 92
93 gin::Handle<StatsCollectionController> controller = gin::CreateHandle( 93 gin::Handle<StatsCollectionController> controller = gin::CreateHandle(
94 isolate, 94 isolate,
95 new StatsCollectionController(std::move(collector_for_controller))); 95 new StatsCollectionController(std::move(collector_for_controller)));
96 DCHECK(!controller.IsEmpty()); 96 DCHECK(!controller.IsEmpty());
97 v8::Local<v8::Object> global = context->Global(); 97 v8::Local<v8::Object> global = context->Global();
98 global->Set(gin::StringToV8(isolate, "statsCollectionController"), 98 global->Set(gin::StringToV8(isolate, "statsCollectionController"),
99 controller.ToV8()); 99 controller.ToV8());
100 return collector_for_caller; 100 return collector_for_caller;
101 } 101 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 histogram->WriteJSON(&histogram_json); 152 histogram->WriteJSON(&histogram_json);
153 return histogram_json; 153 return histogram_json;
154 } 154 }
155 155
156 std::string StatsCollectionController::GetBrowserHistogram( 156 std::string StatsCollectionController::GetBrowserHistogram(
157 const std::string& histogram_name) { 157 const std::string& histogram_name) {
158 return GetHistogram(histogram_name); 158 return GetHistogram(histogram_name);
159 } 159 }
160 160
161 } // namespace html_viewer 161 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/html_viewer.cc ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698