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

Unified Diff: mojo/shell/external_application_listener_unittest.cc

Issue 614663003: Change ExternalApplicationRegistrar::Register API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/external_application_listener_posix.cc ('k') | mojo/shell/external_application_registrar.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/external_application_listener_unittest.cc
diff --git a/mojo/shell/external_application_listener_unittest.cc b/mojo/shell/external_application_listener_unittest.cc
index 5676b68c3b052787971a1f2948286e1bc5a45bd8..b271ef1f69b20cb69cc0141b5307363c74640ce0 100644
--- a/mojo/shell/external_application_listener_unittest.cc
+++ b/mojo/shell/external_application_listener_unittest.cc
@@ -133,9 +133,11 @@ class FakeExternalApplication {
// application_impl is the the actual implementation to be registered.
void Register(scoped_ptr<InterfaceImpl<Application>> application_impl,
base::Closure register_complete_callback) {
- connection_->Register(GURL(url_), &ptr_, register_complete_callback);
+ connection_->Register(GURL(url_),
+ base::Bind(&FakeExternalApplication::OnRegister,
+ base::Unretained(this),
+ register_complete_callback));
application_impl_ = application_impl.Pass();
- ptr_.set_client(application_impl_.get());
}
void ConnectToAppByUrl(std::string app_url) {
@@ -146,6 +148,12 @@ class FakeExternalApplication {
const std::string& url() { return url_; }
private:
+ void OnRegister(base::Closure complete_callback, ShellPtr shell) {
+ ptr_ = shell.Pass();
+ ptr_.set_client(application_impl_.get());
+ complete_callback.Run();
+ }
+
const std::string url_;
scoped_ptr<InterfaceImpl<Application>> application_impl_;
ShellPtr ptr_;
« no previous file with comments | « mojo/shell/external_application_listener_posix.cc ('k') | mojo/shell/external_application_registrar.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698