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

Unified Diff: chrome/profile_import/profile_import_thread.cc

Issue 3654001: Revert 61899 for breaking cookes on file:// URLs.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « chrome/profile_import/profile_import_thread.h ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/profile_import/profile_import_thread.cc
===================================================================
--- chrome/profile_import/profile_import_thread.cc (revision 62042)
+++ chrome/profile_import/profile_import_thread.cc (working copy)
@@ -32,8 +32,6 @@
ChildProcess::current()->AddRefProcess(); // Balanced in Cleanup().
}
-ProfileImportThread::~ProfileImportThread() {}
-
void ProfileImportThread::OnControlMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(ProfileImportThread, msg)
IPC_MESSAGE_HANDLER(ProfileImportProcessMsg_StartImport,
@@ -51,6 +49,7 @@
const DictionaryValue& localized_strings,
bool import_to_bookmark_bar) {
bridge_ = new ExternalProcessImporterBridge(this, localized_strings);
+ bridge_->AddRef(); // Balanced in Cleanup().
ImporterList importer_list;
importer_ = importer_list.CreateImporterByType(profile_info.browser_type);
@@ -60,6 +59,7 @@
return;
}
+ importer_->AddRef(); // Balanced in Cleanup().
importer_->set_import_to_bookmark_bar(import_to_bookmark_bar);
items_to_import_ = items;
@@ -71,14 +71,9 @@
NOTREACHED();
Cleanup();
}
- import_thread_->message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(
- importer_.get(),
- &Importer::StartImport,
- profile_info,
- items,
- bridge_));
+ import_thread_->message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(importer_, &Importer::StartImport,
+ profile_info, items, bridge_));
}
void ProfileImportThread::OnImportCancel() {
@@ -189,7 +184,7 @@
void ProfileImportThread::Cleanup() {
importer_->Cancel();
- importer_ = NULL;
- bridge_ = NULL;
+ importer_->Release();
+ bridge_->Release();
ChildProcess::current()->ReleaseProcess();
}
« no previous file with comments | « chrome/profile_import/profile_import_thread.h ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698