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

Unified Diff: ash/system/ime/tray_ime.cc

Issue 138833004: Uses WeakPtrFactory instead of base::Unretained. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « ash/system/ime/tray_ime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/ime/tray_ime.cc
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
index 695e83e4e9d4c1da3172491785d13d5852955d03..9a3526dc380a1f6cf657468d3c9e680f3c0140e2 100644
--- a/ash/system/ime/tray_ime.cc
+++ b/ash/system/ime/tray_ime.cc
@@ -190,7 +190,8 @@ TrayIME::TrayIME(SystemTray* system_tray)
tray_label_(NULL),
default_(NULL),
detailed_(NULL),
- message_shown_(false) {
+ message_shown_(false),
+ weak_factory_(this) {
Shell::GetInstance()->system_tray_notifier()->AddIMEObserver(this);
}
@@ -243,7 +244,7 @@ void TrayIME::UpdateOrCreateNotification() {
message_center::RichNotificationData(),
new message_center::HandleNotificationClickedDelegate(
base::Bind(&TrayIME::PopupDetailedView,
- base::Unretained(this), 0, true))));
+ weak_factory_.GetWeakPtr(), 0, true))));
message_center->AddNotification(notification.Pass());
message_shown_ = true;
}
« no previous file with comments | « ash/system/ime/tray_ime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698