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

Side by Side Diff: services/reaper/reaper_impl.cc

Issue 1397133002: Remove callers of mojo::Array<size_t> constructor in favor of ::New (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | « services/native_support/redirectors.cc ('k') | services/surfaces/display_impl.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 "services/reaper/reaper_impl.h" 5 #include "services/reaper/reaper_impl.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 void ReaperImpl::Create(mojo::ApplicationConnection* connection, 278 void ReaperImpl::Create(mojo::ApplicationConnection* connection,
279 mojo::InterfaceRequest<Diagnostics> request) { 279 mojo::InterfaceRequest<Diagnostics> request) {
280 // TODO(aa): Enforce that only testing code can connect to this interface. 280 // TODO(aa): Enforce that only testing code can connect to this interface.
281 diagnostics_bindings_.AddBinding(this, request.Pass()); 281 diagnostics_bindings_.AddBinding(this, request.Pass());
282 } 282 }
283 283
284 void ReaperImpl::DumpNodes( 284 void ReaperImpl::DumpNodes(
285 const mojo::Callback<void(mojo::Array<NodePtr>)>& callback) { 285 const mojo::Callback<void(mojo::Array<NodePtr>)>& callback) {
286 mojo::Array<NodePtr> result(0u); 286 auto result = mojo::Array<NodePtr>::New(0u);
287 for (const auto& app : nodes_) { 287 for (const auto& app : nodes_) {
288 for (const auto& node_info : app.second) { 288 for (const auto& node_info : app.second) {
289 NodePtr node(Node::New()); 289 NodePtr node(Node::New());
290 node->app_url = app.first.url->spec(); 290 node->app_url = app.first.url->spec();
291 node->node_id = node_info.first; 291 node->node_id = node_info.first;
292 node->other_app_url = node_info.second.other_node.app_url.url->spec(); 292 node->other_app_url = node_info.second.other_node.app_url.url->spec();
293 node->other_id = node_info.second.other_node.node_id; 293 node->other_id = node_info.second.other_node.node_id;
294 node->is_source = node_info.second.is_source; 294 node->is_source = node_info.second.is_source;
295 result.push_back(node.Pass()); 295 result.push_back(node.Pass());
296 } 296 }
(...skipping 25 matching lines...) Expand all
322 322
323 void ReaperImpl::SetScythe(ScythePtr scythe) { 323 void ReaperImpl::SetScythe(ScythePtr scythe) {
324 scythe_ = scythe.Pass(); 324 scythe_ = scythe.Pass();
325 } 325 }
326 326
327 void ReaperImpl::Ping(const mojo::Closure& closure) { 327 void ReaperImpl::Ping(const mojo::Closure& closure) {
328 closure.Run(); 328 closure.Run();
329 } 329 }
330 330
331 } // namespace reaper 331 } // namespace reaper
OLDNEW
« no previous file with comments | « services/native_support/redirectors.cc ('k') | services/surfaces/display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698