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

Unified Diff: chrome/browser/importer/importer_unittest.cc

Issue 4188008: Use make_scoped_refptr for NewRunnableMethod if the raw ptr type is derivd from RefCountedThreadSafe (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: address comment 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/importer/importer_unittest.cc
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index 5261c03331484f4f833244c6969732c49b8dace9..214f0565eb23588e781ec6472f72af50a19a29c0 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -122,7 +122,7 @@ class ImporterTest : public testing::Test {
items = items | SEARCH_ENGINES;
loop->PostTask(FROM_HERE, NewRunnableMethod(host.get(),
&ImporterHost::StartImportSettings, profile_info,
- static_cast<Profile*>(NULL), items, writer, true));
+ static_cast<Profile*>(NULL), items, make_scoped_refptr(writer), true));
loop->Run();
}
@@ -705,10 +705,14 @@ TEST_F(ImporterTest, MAYBE(Firefox2Importer)) {
profile_info.app_path = app_path_;
profile_info.source_path = profile_path_;
- loop->PostTask(FROM_HERE, NewRunnableMethod(host.get(),
- &ImporterHost::StartImportSettings, profile_info,
+ loop->PostTask(FROM_HERE, NewRunnableMethod(
+ host.get(),
+ &ImporterHost::StartImportSettings,
+ profile_info,
static_cast<Profile*>(NULL),
- HISTORY | PASSWORDS | FAVORITES | SEARCH_ENGINES, observer, true));
+ HISTORY | PASSWORDS | FAVORITES | SEARCH_ENGINES,
+ make_scoped_refptr(observer),
+ true));
loop->Run();
}
« no previous file with comments | « chrome/browser/file_path_watcher_browsertest.cc ('k') | chrome/browser/notifications/desktop_notification_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698