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

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

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: hate Created 5 years, 9 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
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (!MoveNode(source, dest)) { 257 if (!MoveNode(source, dest)) {
258 LOG(ERROR) << "Could not complete transfer because move failed from: (" 258 LOG(ERROR) << "Could not complete transfer because move failed from: ("
259 << *source_app_url.url << "," << source_node_id << ") to: (" 259 << *source_app_url.url << "," << source_node_id << ") to: ("
260 << *dest_app_url.url << "," << dest_node_id << ")"; 260 << *dest_app_url.url << "," << dest_node_id << ")";
261 } 261 }
262 262
263 Collect(); 263 Collect();
264 } 264 }
265 265
266 bool ReaperImpl::ConfigureIncomingConnection( 266 bool ReaperImpl::ConfigureIncomingConnection(
267 mojo::ApplicationConnection* connection) { 267 mojo::ApplicationConnection* connection,
268 const std::string& url) {
268 connection->AddService<Reaper>(this); 269 connection->AddService<Reaper>(this);
269 connection->AddService<Diagnostics>(this); 270 connection->AddService<Diagnostics>(this);
270 return true; 271 return true;
271 } 272 }
272 273
273 void ReaperImpl::Create(mojo::ApplicationConnection* connection, 274 void ReaperImpl::Create(mojo::ApplicationConnection* connection,
274 mojo::InterfaceRequest<Reaper> request) { 275 mojo::InterfaceRequest<Reaper> request) {
275 GetReaperForApp(connection->GetRemoteApplicationURL(), request.Pass()); 276 GetReaperForApp(connection->GetRemoteApplicationURL(), request.Pass());
276 } 277 }
277 278
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 323
323 void ReaperImpl::SetScythe(ScythePtr scythe) { 324 void ReaperImpl::SetScythe(ScythePtr scythe) {
324 scythe_ = scythe.Pass(); 325 scythe_ = scythe.Pass();
325 } 326 }
326 327
327 void ReaperImpl::Ping(const mojo::Closure& closure) { 328 void ReaperImpl::Ping(const mojo::Closure& closure) {
328 closure.Run(); 329 closure.Run();
329 } 330 }
330 331
331 } // namespace reaper 332 } // namespace reaper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698