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

Unified Diff: chrome/browser/notifications/desktop_notification_service_unittest.cc

Issue 3581008: Fix instances of passing raw pointers to RefCounted objects in tasks. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge Created 10 years, 2 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
Index: chrome/browser/notifications/desktop_notification_service_unittest.cc
diff --git a/chrome/browser/notifications/desktop_notification_service_unittest.cc b/chrome/browser/notifications/desktop_notification_service_unittest.cc
index f88466b4d812bfa4e7149c69ce6bcb1b9b0be8df..0e52cb458e1cb1af59c5e5d4f62a90bc3974b8b7 100644
--- a/chrome/browser/notifications/desktop_notification_service_unittest.cc
+++ b/chrome/browser/notifications/desktop_notification_service_unittest.cc
@@ -41,8 +41,10 @@ class ThreadProxy : public base::RefCountedThreadSafe<ThreadProxy> {
int CacheHasPermission(NotificationsPrefsCache* cache, const GURL& url) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(this, &ThreadProxy::CacheHasPermissionIO,
- cache, url));
+ NewRunnableMethod(this,
+ &ThreadProxy::CacheHasPermissionIO,
+ make_scoped_refptr(cache),
+ url));
io_event_.Signal();
ui_event_.Wait(); // Wait for IO thread to be done.
ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc ('k') | chrome/browser/renderer_host/audio_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698