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

Side by Side Diff: mojo/services/test_service/test_request_tracker_application.cc

Issue 1539863002: Convert Pass()→std::move() in mojo/services/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing forward declare that was masked by pre-existing incorrect #include ordering. Created 5 years 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 2014 The Chromium Authors. All rights reserved. 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 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 "mojo/services/test_service/test_request_tracker_application.h" 5 #include "mojo/services/test_service/test_request_tracker_application.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <utility>
8 9
9 #include "mojo/application/public/cpp/application_connection.h" 10 #include "mojo/application/public/cpp/application_connection.h"
10 #include "mojo/application/public/cpp/application_runner.h" 11 #include "mojo/application/public/cpp/application_runner.h"
11 #include "mojo/public/c/system/main.h" 12 #include "mojo/public/c/system/main.h"
12 #include "mojo/services/test_service/test_time_service_impl.h" 13 #include "mojo/services/test_service/test_time_service_impl.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 namespace test { 16 namespace test {
16 17
17 TestRequestTrackerApplication::TestRequestTrackerApplication() 18 TestRequestTrackerApplication::TestRequestTrackerApplication()
(...skipping 13 matching lines...) Expand all
31 // Note, this app is single-threaded, so this is thread safe. 32 // Note, this app is single-threaded, so this is thread safe.
32 connection->AddService<TestTimeService>(this); 33 connection->AddService<TestTimeService>(this);
33 connection->AddService<TestRequestTracker>(this); 34 connection->AddService<TestRequestTracker>(this);
34 connection->AddService<TestTrackedRequestService>(this); 35 connection->AddService<TestTrackedRequestService>(this);
35 return true; 36 return true;
36 } 37 }
37 38
38 void TestRequestTrackerApplication::Create( 39 void TestRequestTrackerApplication::Create(
39 ApplicationConnection* connection, 40 ApplicationConnection* connection,
40 InterfaceRequest<TestTimeService> request) { 41 InterfaceRequest<TestTimeService> request) {
41 new TestTimeServiceImpl(app_impl_, request.Pass()); 42 new TestTimeServiceImpl(app_impl_, std::move(request));
42 } 43 }
43 44
44 void TestRequestTrackerApplication::Create( 45 void TestRequestTrackerApplication::Create(
45 ApplicationConnection* connection, 46 ApplicationConnection* connection,
46 InterfaceRequest<TestRequestTracker> request) { 47 InterfaceRequest<TestRequestTracker> request) {
47 new TestRequestTrackerImpl(request.Pass(), &context_); 48 new TestRequestTrackerImpl(std::move(request), &context_);
48 } 49 }
49 50
50 void TestRequestTrackerApplication::Create( 51 void TestRequestTrackerApplication::Create(
51 ApplicationConnection* connection, 52 ApplicationConnection* connection,
52 InterfaceRequest<TestTrackedRequestService> request) { 53 InterfaceRequest<TestTrackedRequestService> request) {
53 new TestTrackedRequestServiceImpl(request.Pass(), &context_); 54 new TestTrackedRequestServiceImpl(std::move(request), &context_);
54 } 55 }
55 56
56 } // namespace test 57 } // namespace test
57 } // namespace mojo 58 } // namespace mojo
58 59
59 MojoResult MojoMain(MojoHandle shell_handle) { 60 MojoResult MojoMain(MojoHandle shell_handle) {
60 mojo::ApplicationRunner runner( 61 mojo::ApplicationRunner runner(
61 new mojo::test::TestRequestTrackerApplication); 62 new mojo::test::TestRequestTrackerApplication);
62 return runner.Run(shell_handle); 63 return runner.Run(shell_handle);
63 } 64 }
OLDNEW
« no previous file with comments | « mojo/services/network/web_socket_impl.cc ('k') | mojo/services/test_service/test_request_tracker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698