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

Unified Diff: chrome/browser/win/settings_app_monitor.cc

Issue 2065673002: Fix shutdown crash in settings app monitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/settings_app_monitor.cc
diff --git a/chrome/browser/win/settings_app_monitor.cc b/chrome/browser/win/settings_app_monitor.cc
index af0676669e15276cbad73a6e6142c9e4f57e1a89..2bb39c983ef1c2e9d95341d9a660056a91c6d9f7 100644
--- a/chrome/browser/win/settings_app_monitor.cc
+++ b/chrome/browser/win/settings_app_monitor.cc
@@ -54,7 +54,7 @@ class SettingsAppMonitor::Context {
// for the dedicated thread on which the context lives (owned by its
// UIAutomationClient).
void Initialize(base::SingleThreadTaskRunner* task_runner,
- base::SequencedTaskRunner* monitor_runner,
+ scoped_refptr<base::SequencedTaskRunner> monitor_runner,
const base::WeakPtr<SettingsAppMonitor>& monitor);
private:
@@ -96,7 +96,7 @@ class SettingsAppMonitor::Context {
base::SingleThreadTaskRunner* task_runner_ = nullptr;
// The task runner on which the owning monitor lives.
- base::SequencedTaskRunner* monitor_runner_ = nullptr;
+ scoped_refptr<base::SequencedTaskRunner> monitor_runner_ = nullptr;
// The monitor that owns this context.
base::WeakPtr<SettingsAppMonitor> monitor_;
@@ -564,7 +564,7 @@ void SettingsAppMonitor::Context::DeleteOnAutomationThread() {
void SettingsAppMonitor::Context::Initialize(
base::SingleThreadTaskRunner* task_runner,
- base::SequencedTaskRunner* monitor_runner,
+ scoped_refptr<base::SequencedTaskRunner> monitor_runner,
const base::WeakPtr<SettingsAppMonitor>& monitor) {
// This and all other methods must be called on the automation thread.
DCHECK(task_runner->BelongsToCurrentThread());
@@ -705,7 +705,7 @@ SettingsAppMonitor::SettingsAppMonitor(Delegate* delegate)
FROM_HERE,
base::Bind(&SettingsAppMonitor::Context::Initialize, context_,
base::Unretained(automation_thread_.task_runner().get()),
- base::Unretained(base::SequencedTaskRunnerHandle::Get().get()),
+ base::SequencedTaskRunnerHandle::Get(),
weak_ptr_factory_.GetWeakPtr()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698