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

Side by Side Diff: shell/application_manager/application_manager_unittest.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « shell/android/nfc_apptest.cc ('k') | shell/shell_apptest.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 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "mojo/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 if (connection->GetRemoteApplicationURL() == kTestAURLString) 353 if (connection->GetRemoteApplicationURL() == kTestAURLString)
354 connection->AddService<TestB>(this); 354 connection->AddService<TestB>(this);
355 else 355 else
356 connection->AddService<TestA>(this); 356 connection->AddService<TestA>(this);
357 return true; 357 return true;
358 } 358 }
359 359
360 void Create(ApplicationConnection* connection, 360 void Create(ApplicationConnection* connection,
361 InterfaceRequest<TestA> request) override { 361 InterfaceRequest<TestA> request) override {
362 ApplicationConnection* b_connection = 362 ApplicationConnection* b_connection =
363 app_->ConnectToApplication(kTestBURLString); 363 app_->ConnectToApplicationDeprecated(kTestBURLString);
364 b_connection->AddService<TestC>(this); 364 b_connection->AddService<TestC>(this);
365 a_bindings_.push_back( 365 a_bindings_.push_back(
366 new TestAImpl(b_connection, context_, request.Pass())); 366 new TestAImpl(b_connection, context_, request.Pass()));
367 } 367 }
368 368
369 void Create(ApplicationConnection* connection, 369 void Create(ApplicationConnection* connection,
370 InterfaceRequest<TestB> request) override { 370 InterfaceRequest<TestB> request) override {
371 new TestBImpl(connection, context_, request.Pass()); 371 new TestBImpl(connection, context_, request.Pass());
372 } 372 }
373 373
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 bool called = false; 840 bool called = false;
841 application_manager_->ConnectToApplication( 841 application_manager_->ConnectToApplication(
842 GURL("test:test"), GURL(), nullptr, nullptr, 842 GURL("test:test"), GURL(), nullptr, nullptr,
843 base::Bind(&QuitClosure, base::Unretained(&called))); 843 base::Bind(&QuitClosure, base::Unretained(&called)));
844 loop_.Run(); 844 loop_.Run();
845 EXPECT_TRUE(called); 845 EXPECT_TRUE(called);
846 } 846 }
847 847
848 } // namespace 848 } // namespace
849 } // namespace shell 849 } // namespace shell
OLDNEW
« no previous file with comments | « shell/android/nfc_apptest.cc ('k') | shell/shell_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698