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

Unified Diff: shell/application_manager/application_manager.cc

Issue 1219683015: Convert //shell/... to use set_connection_error_handler() instead of set_error_handler(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | shell/application_manager/application_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/application_manager.cc
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
index 5da52a795e3d78dc10d249aba94ef3fea195a032..105ae827f5ee2f0cec8ce13bb7da17c61c2a2d99 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -47,7 +47,7 @@ std::vector<std::string> Concatenate(const std::vector<std::string>& v1,
} // namespace
-class ApplicationManager::ContentHandlerConnection : public mojo::ErrorHandler {
+class ApplicationManager::ContentHandlerConnection {
public:
ContentHandlerConnection(ApplicationManager* manager,
const GURL& content_handler_url)
@@ -61,17 +61,16 @@ class ApplicationManager::ContentHandlerConnection : public mojo::ErrorHandler {
mojo::InterfacePtrInfo<mojo::ContentHandler>(pipe.handle0.Pass(), 0u));
services->ConnectToService(mojo::ContentHandler::Name_,
pipe.handle1.Pass());
- content_handler_.set_error_handler(this);
+ content_handler_.set_connection_error_handler(
+ [this]() { manager_->OnContentHandlerError(this); });
}
+ ~ContentHandlerConnection() {}
mojo::ContentHandler* content_handler() { return content_handler_.get(); }
GURL content_handler_url() { return content_handler_url_; }
private:
- // mojo::ErrorHandler implementation:
- void OnConnectionError() override { manager_->OnContentHandlerError(this); }
-
ApplicationManager* manager_;
GURL content_handler_url_;
mojo::ContentHandlerPtr content_handler_;
« no previous file with comments | « no previous file | shell/application_manager/application_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698