diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-22 16:13:08 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-22 16:15:14 +0000 |
commit | 4d40c984d15d1ae5f90fe3d23ea53670f2358b8e (patch) | |
tree | cf1e68bc3c5d5bf596125b107ea63980841f0040 /athena/main | |
parent | 766f89290329c3c74a1cc717dbc391c27c94ea91 (diff) | |
download | chromium_src-4d40c984d15d1ae5f90fe3d23ea53670f2358b8e.zip chromium_src-4d40c984d15d1ae5f90fe3d23ea53670f2358b8e.tar.gz chromium_src-4d40c984d15d1ae5f90fe3d23ea53670f2358b8e.tar.bz2 |
Fixes three crashes
* AppListViewDelegate was accessing deleted search_provider.
* DeviceSocketListener::StopListening can happen after DeviceSocketManager is deleted
* Explicitly delete FilePathWatcher. This was causing
recursive callback to FilePathWatcherImpl::Cancel from
FilePathWatcherImpl::CancelOnMessageLoopThread, which
caused crash.
Clean ups
* change OnIO to OnFILE as they run on FILE thread.
* removed unused singleton related code.
BUG=None
TEST=Run athena_main on desktop and close window.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291214
R=flackr@chromium.org, mukai@chromium.org
Review URL: https://codereview.chromium.org/490033003
Cr-Commit-Position: refs/heads/master@{#291423}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena/main')
-rw-r--r-- | athena/main/athena_launcher.cc | 8 | ||||
-rw-r--r-- | athena/main/athena_launcher.h | 9 | ||||
-rw-r--r-- | athena/main/athena_main.cc | 5 |
3 files changed, 15 insertions, 7 deletions
diff --git a/athena/main/athena_launcher.cc b/athena/main/athena_launcher.cc index de4dbc7..3810c04 100644 --- a/athena/main/athena_launcher.cc +++ b/athena/main/athena_launcher.cc @@ -22,7 +22,6 @@ #include "athena/wm/public/window_manager.h" #include "base/command_line.h" #include "base/memory/scoped_ptr.h" -#include "content/public/browser/browser_thread.h" #include "ui/app_list/app_list_switches.h" #include "ui/aura/window_property.h" #include "ui/keyboard/keyboard_controller.h" @@ -92,7 +91,8 @@ class AthenaViewsDelegate : public views::ViewsDelegate { }; void StartAthenaEnv(aura::Window* root_window, - athena::ScreenManagerDelegate* delegate) { + athena::ScreenManagerDelegate* delegate, + scoped_refptr<base::TaskRunner> file_runner) { base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); // Force showing in the experimental app-list view. @@ -113,9 +113,7 @@ void StartAthenaEnv(aura::Window* root_window, aura::client::SetVisibilityClient(root_window, env_state->visibility_client.get()); - athena::SystemUI::Create( - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::FILE)); + athena::SystemUI::Create(file_runner); athena::InputManager::Create()->OnRootWindowCreated(root_window); athena::ScreenManager::Create(delegate, root_window); athena::WindowManager::Create(); diff --git a/athena/main/athena_launcher.h b/athena/main/athena_launcher.h index 66a853c..b912e9d 100644 --- a/athena/main/athena_launcher.h +++ b/athena/main/athena_launcher.h @@ -5,6 +5,12 @@ #ifndef ATHENA_MAIN_ATHENA_LAUNCHER_H_ #define ATHENA_MAIN_ATHENA_LAUNCHER_H_ +#include "base/memory/ref_counted.h" + +namespace base { +class TaskRunner; +} + namespace aura { class Window; } @@ -20,7 +26,8 @@ class ScreenManagerDelegate; // Starts/shuts down the athena shell environment. void StartAthenaEnv(aura::Window* root_window, - ScreenManagerDelegate* screen_manager_delegate); + ScreenManagerDelegate* screen_manager_delegate, + scoped_refptr<base::TaskRunner> file_runner); void StartAthenaSessionWithContext(content::BrowserContext* context); diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc index 87982cc..3d5408e 100644 --- a/athena/main/athena_main.cc +++ b/athena/main/athena_main.cc @@ -11,6 +11,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "content/public/app/content_main.h" +#include "content/public/browser/browser_thread.h" #include "extensions/shell/app/shell_main_delegate.h" #include "extensions/shell/browser/shell_browser_main_delegate.h" #include "extensions/shell/browser/shell_content_browser_client.h" @@ -94,7 +95,9 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate { screen_manager_delegate_.reset( new AthenaScreenManagerDelegate(desktop_controller)); athena::StartAthenaEnv(desktop_controller->host()->window(), - screen_manager_delegate_.get()); + screen_manager_delegate_.get(), + content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::FILE)); athena::StartAthenaSessionWithContext(context); } |