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

Side by Side Diff: mojo/examples/test/example_service_impl.cc

Issue 399653004: Add a Mojo example apptest that runs in mojo_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/examples/test/example_service_impl.h"
6
7 #include "base/logging.h"
8 #include "mojo/public/cpp/utility/run_loop.h"
9
10 namespace mojo {
11
12 ExampleServiceImpl::ExampleServiceImpl(ApplicationConnection* connection,
13 ApplicationDelegate* delegate) {
14 }
15
16 ExampleServiceImpl::~ExampleServiceImpl() {}
17
18 void ExampleServiceImpl::Echo(const String& to_echo,
19 const Callback<void(String)>& callback) {
20 LOG(ERROR) << "MSW: ExampleServiceImpl::Echo: " << to_echo.get();
21 //callback.Run(to_echo);
22 RunLoop::current()->Quit();
Ben Goodger (Google) 2014/07/18 20:02:52 What are you trying to achieve here?
msw 2014/07/21 18:58:22 The process continues running after executing the
Ben Goodger (Google) 2014/07/21 20:02:38 You would not be able to add code like this to a p
tim (not reviewing) 2014/07/23 01:16:09 I think that the way it is written now, ExampleSer
23 }
24
25 void ExampleServiceImpl::Ping(uint16_t ping_value) {
26 LOG(ERROR) << "MSW: ExampleServiceImpl::Ping: " << ping_value;
27 client()->Pong(ping_value);
28 RunLoop::current()->Quit();
Ben Goodger (Google) 2014/07/18 20:02:52 again not sure why you're quitting the runloop her
msw 2014/07/21 18:58:22 ditto; removed.
29 }
30
31 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698