summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 23:35:47 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 23:35:47 +0000
commit0d7e79fa8ce1bef5ca6d413c908c267c35f5867a (patch)
tree5509297bccd2e1b4c8abd0680090547c4b707f18 /chrome/browser/importer
parentf94151690a90af7029a1ab6ddb0f7679af3a9c7d (diff)
downloadchromium_src-0d7e79fa8ce1bef5ca6d413c908c267c35f5867a.zip
chromium_src-0d7e79fa8ce1bef5ca6d413c908c267c35f5867a.tar.gz
chromium_src-0d7e79fa8ce1bef5ca6d413c908c267c35f5867a.tar.bz2
Revert 61899 for breaking cookes on file:// URLs.
BUG=58553 ================================================= Fix instances of passing raw pointers to RefCounted objects in tasks. Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3654001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r--chrome/browser/importer/importer_unittest.cc28
1 files changed, 8 insertions, 20 deletions
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index d99b1e9..879d7cb 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -120,15 +120,9 @@ class ImporterTest : public testing::Test {
int items = HISTORY | PASSWORDS | FAVORITES;
if (import_search_plugins)
items = items | SEARCH_ENGINES;
- loop->PostTask(
- FROM_HERE,
- NewRunnableMethod(host.get(),
- &ImporterHost::StartImportSettings,
- profile_info,
- static_cast<Profile*>(NULL),
- items,
- make_scoped_refptr(writer),
- true));
+ loop->PostTask(FROM_HERE, NewRunnableMethod(host.get(),
+ &ImporterHost::StartImportSettings, profile_info,
+ static_cast<Profile*>(NULL), items, writer, true));
loop->Run();
}
@@ -704,23 +698,17 @@ TEST_F(ImporterTest, MAYBE(Firefox2Importer)) {
MessageLoop* loop = MessageLoop::current();
scoped_refptr<ImporterHost> host = new ImporterHost();
- scoped_refptr<FirefoxObserver> observer = new FirefoxObserver();
+ FirefoxObserver* observer = new FirefoxObserver();
host->SetObserver(observer);
ProfileInfo profile_info;
profile_info.browser_type = FIREFOX2;
profile_info.app_path = app_path_;
profile_info.source_path = profile_path_;
- loop->PostTask(
- FROM_HERE,
- NewRunnableMethod(
- host.get(),
- &ImporterHost::StartImportSettings,
- profile_info,
- static_cast<Profile*>(NULL),
- HISTORY | PASSWORDS | FAVORITES | SEARCH_ENGINES,
- observer,
- true));
+ loop->PostTask(FROM_HERE, NewRunnableMethod(host.get(),
+ &ImporterHost::StartImportSettings, profile_info,
+ static_cast<Profile*>(NULL),
+ HISTORY | PASSWORDS | FAVORITES | SEARCH_ENGINES, observer, true));
loop->Run();
}