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

Unified Diff: chrome/browser/search/hotword_service.cc

Issue 2067183003: Use WeakPtr in HotwordService Constructor to ensure that invokes to InitializeMicrophoneObserver ca… (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/search/hotword_service.cc
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc
index cb6f7903a8b62cef3e1f673f4620edfee247e29e..24fa2120f0a72d1a4a0f446c3e383b636e49d271 100644
--- a/chrome/browser/search/hotword_service.cc
+++ b/chrome/browser/search/hotword_service.cc
@@ -402,7 +402,7 @@ HotwordService::HotwordService(Profile* profile)
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&HotwordService::InitializeMicrophoneObserver,
- base::Unretained(this)));
+ weak_factory_.GetWeakPtr()));
}
HotwordService::~HotwordService() {
« 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