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

Side by Side Diff: mojo/shell/application_manager_apptest.cc

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
Patch Set: . Created 4 years, 10 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 : id(id), url(url), pid(base::kNullProcessId), name(name) {} 84 : id(id), url(url), pid(base::kNullProcessId), name(name) {}
85 85
86 uint32_t id; 86 uint32_t id;
87 std::string url; 87 std::string url;
88 base::ProcessId pid; 88 base::ProcessId pid;
89 std::string name; 89 std::string name;
90 }; 90 };
91 91
92 void AddListenerAndWaitForApplications() { 92 void AddListenerAndWaitForApplications() {
93 mojom::ApplicationManagerPtr application_manager; 93 mojom::ApplicationManagerPtr application_manager;
94 shell()->ConnectToService("mojo:shell", &application_manager); 94 shell()->ConnectToInterface("mojo:shell", &application_manager);
95 95
96 application_manager->AddListener(binding_.CreateInterfacePtrAndBind()); 96 application_manager->AddListener(binding_.CreateInterfacePtrAndBind());
97 binding_.WaitForIncomingMethodCall(); 97 binding_.WaitForIncomingMethodCall();
98 } 98 }
99 99
100 bool ContainsApplicationNamed(const std::string& name) const { 100 bool ContainsApplicationNamed(const std::string& name) const {
101 for (const auto& application : initial_applications_) { 101 for (const auto& application : initial_applications_) {
102 if (application.name == name) 102 if (application.name == name)
103 return true; 103 return true;
104 } 104 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 driver.set_connection_error_handler( 210 driver.set_connection_error_handler(
211 base::Bind(&ApplicationManagerAppTest::OnDriverQuit, 211 base::Bind(&ApplicationManagerAppTest::OnDriverQuit,
212 base::Unretained(this))); 212 base::Unretained(this)));
213 driver->QuitDriver(); 213 driver->QuitDriver();
214 base::MessageLoop::current()->Run(); 214 base::MessageLoop::current()->Run();
215 } 215 }
216 216
217 } // namespace shell 217 } // namespace shell
218 } // namespace mojo 218 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/test_service/test_time_service_impl.cc ('k') | mojo/shell/application_manager_apptest_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698