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

Side by Side Diff: content/public/test/test_mojo_app.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « content/public/test/test_file_system_context.cc ('k') | content/public/test/test_utils.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 "content/public/test/test_mojo_app.h" 5 #include "content/public/test/test_mojo_app.h"
6 6
7 #include <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "mojo/application/public/cpp/application_connection.h" 10 #include "mojo/application/public/cpp/application_connection.h"
9 #include "mojo/application/public/cpp/application_impl.h" 11 #include "mojo/application/public/cpp/application_impl.h"
10 12
11 namespace content { 13 namespace content {
12 14
13 const char kTestMojoAppUrl[] = "system:content_mojo_test"; 15 const char kTestMojoAppUrl[] = "system:content_mojo_test";
14 16
15 TestMojoApp::TestMojoApp() : service_binding_(this), app_(nullptr) { 17 TestMojoApp::TestMojoApp() : service_binding_(this), app_(nullptr) {
16 } 18 }
17 19
18 TestMojoApp::~TestMojoApp() { 20 TestMojoApp::~TestMojoApp() {
19 } 21 }
20 22
21 void TestMojoApp::Initialize(mojo::ApplicationImpl* app) { 23 void TestMojoApp::Initialize(mojo::ApplicationImpl* app) {
22 app_ = app; 24 app_ = app;
23 } 25 }
24 26
25 bool TestMojoApp::ConfigureIncomingConnection( 27 bool TestMojoApp::ConfigureIncomingConnection(
26 mojo::ApplicationConnection* connection) { 28 mojo::ApplicationConnection* connection) {
27 requestor_url_ = GURL(connection->GetRemoteApplicationURL()); 29 requestor_url_ = GURL(connection->GetRemoteApplicationURL());
28 connection->AddService<TestMojoService>(this); 30 connection->AddService<TestMojoService>(this);
29 return true; 31 return true;
30 } 32 }
31 33
32 void TestMojoApp::Create(mojo::ApplicationConnection* connection, 34 void TestMojoApp::Create(mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<TestMojoService> request) { 35 mojo::InterfaceRequest<TestMojoService> request) {
34 DCHECK(!service_binding_.is_bound()); 36 DCHECK(!service_binding_.is_bound());
35 service_binding_.Bind(request.Pass()); 37 service_binding_.Bind(std::move(request));
36 } 38 }
37 39
38 void TestMojoApp::DoSomething(const DoSomethingCallback& callback) { 40 void TestMojoApp::DoSomething(const DoSomethingCallback& callback) {
39 callback.Run(); 41 callback.Run();
40 DCHECK(app_); 42 DCHECK(app_);
41 app_->Quit(); 43 app_->Quit();
42 } 44 }
43 45
44 void TestMojoApp::GetRequestorURL(const GetRequestorURLCallback& callback) { 46 void TestMojoApp::GetRequestorURL(const GetRequestorURLCallback& callback) {
45 callback.Run(requestor_url_.spec()); 47 callback.Run(requestor_url_.spec());
46 } 48 }
47 49
48 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_file_system_context.cc ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698