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

Unified Diff: athena/system/system_ui_impl.cc

Issue 490033003: Fixes three crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: athena/system/system_ui_impl.cc
diff --git a/athena/system/system_ui_impl.cc b/athena/system/system_ui_impl.cc
index 39867ad96d81db742ea72b3c1f9fa8763b5c431a..fce14cba4a8be0018674190218ba4ea4b901a37e 100644
--- a/athena/system/system_ui_impl.cc
+++ b/athena/system/system_ui_impl.cc
@@ -18,13 +18,16 @@ SystemUI* instance = NULL;
class SystemUIImpl : public SystemUI {
public:
- SystemUIImpl(scoped_refptr<base::TaskRunner> io_task_runner)
+ SystemUIImpl(scoped_refptr<base::TaskRunner> file_task_runner)
: orientation_controller_(new OrientationController()),
power_button_controller_(new PowerButtonController) {
- orientation_controller_->InitWith(io_task_runner);
+ orientation_controller_->InitWith(file_task_runner);
}
virtual ~SystemUIImpl() {
+ // Stops file watching now if exists. Waiting until message loop shutdon
+ // leads to FilePathWatcher crash.
+ orientation_controller_->StopWatchingSocketPath();
}
private:
@@ -37,10 +40,9 @@ class SystemUIImpl : public SystemUI {
} // namespace
// static
-SystemUI* SystemUI::Create(
- scoped_refptr<base::TaskRunner> io_task_runner) {
- DeviceSocketListener::CreateSocketManager(io_task_runner);
- instance = new SystemUIImpl(io_task_runner);
+SystemUI* SystemUI::Create(scoped_refptr<base::TaskRunner> file_task_runner) {
+ DeviceSocketListener::CreateSocketManager(file_task_runner);
+ instance = new SystemUIImpl(file_task_runner);
return instance;
}
« athena/system/device_socket_listener.cc ('K') | « athena/system/orientation_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698