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

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: Add file thread 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
« no previous file with comments | « athena/system/orientation_controller.cc ('k') | athena/test/athena_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b3bacb5f77b98c3eb9697891e96d120941afbd7d 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_->Shutdown();
}
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;
}
« no previous file with comments | « athena/system/orientation_controller.cc ('k') | athena/test/athena_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698