Commit d30213ce authored by gab@chromium.org's avatar gab@chromium.org

OOP import on Linux (i.e., on all platforms since Linux is the only one left!).

After this CL the only blocker to completely remove the in-process import code will be the toolbar importer on Windows (http://crbug.com/243423).

BUG=56816
TEST=Manually verify that first run import works (i.e. imports FF history when FF is default) on Linux.

Review URL: https://chromiumcodereview.appspot.com/17379006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208054 0039d316-1c4b-4281-b951-d872f2087c98
parent 5acc2bc6
......@@ -30,8 +30,8 @@
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/extensions_quota_service.h"
#include "chrome/browser/importer/external_process_importer_host.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/browser/importer/importer_host.h"
#include "chrome/browser/importer/importer_type.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
......@@ -979,7 +979,7 @@ void BookmarksImportFunction::FileSelected(const base::FilePath& path,
// TODO(jgreenwald): remove ifdef once extensions are no longer built on
// Android.
// Deletes itself.
ImporterHost* importer_host = new ImporterHost;
ImporterHost* importer_host = new ExternalProcessImporterHost;
importer::SourceProfile source_profile;
source_profile.importer_type = importer::TYPE_BOOKMARKS_FILE;
source_profile.source_path = path;
......
......@@ -677,15 +677,7 @@ void AutoImport(
int dont_import_items,
const std::string& import_bookmarks_path) {
// Deletes itself.
ImporterHost* importer_host;
// TODO(csilv,mirandac): Out-of-process import has only been qualified on
// MacOS X and Windows, so we will only use it on those platforms.
// Linux still uses the in-process import (http://crbug.com/56816).
#if defined(OS_MACOSX) || defined(OS_WIN)
importer_host = new ExternalProcessImporterHost;
#else
importer_host = new ImporterHost;
#endif
ImporterHost* importer_host = new ExternalProcessImporterHost;
base::FilePath local_state_path;
PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
......@@ -753,14 +745,7 @@ void AutoImport(
if (!import_bookmarks_path.empty()) {
// Deletes itself.
ImporterHost* file_importer_host;
// TODO(gab): Make Linux use OOP import as well (http://crbug.com/56816) and
// get rid of these ugly ifdefs.
#if defined(OS_MACOSX) || defined(OS_WIN)
file_importer_host = new ExternalProcessImporterHost;
#else
file_importer_host = new ImporterHost;
#endif
ImporterHost* file_importer_host = new ExternalProcessImporterHost;
file_importer_host->set_headless();
ImportFromFile(profile, file_importer_host, import_bookmarks_path);
......
......@@ -64,6 +64,7 @@ void ExternalProcessImporterClient::Cancel() {
}
void ExternalProcessImporterClient::OnProcessCrashed(int exit_code) {
DLOG(ERROR) << __FUNCTION__;
if (cancelled_)
return;
......
......@@ -269,13 +269,7 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
items = items | importer::SEARCH_ENGINES;
// Deletes itself.
// TODO(gab): Use ExternalProcessImporterHost on Linux as well.
ImporterHost* host;
#if defined(OS_MACOSX) || defined(OS_WIN)
host = new ExternalProcessImporterHost;
#else
host = new ImporterHost;
#endif
ImporterHost* host = new ExternalProcessImporterHost;
host->SetObserver(observer);
host->StartImportSettings(source_profile,
browser()->profile(),
......
......@@ -111,9 +111,6 @@ void ImportDataHandler::ImportData(const ListValue* args) {
state);
import_did_succeed_ = false;
// TODO(gab): Make Linux use OOP import as well (http://crbug.com/56816) and
// get rid of these ugly ifdefs.
#if defined(OS_MACOSX) || defined(OS_WIN)
// The Google Toolbar importer doesn't work for the out-of-process import.
// This is the only entry point for this importer (it is never used on first
// run). See discussion on http://crbug.com/219419 for details.
......@@ -121,9 +118,6 @@ void ImportDataHandler::ImportData(const ListValue* args) {
importer_host_ = new ImporterHost;
else
importer_host_ = new ExternalProcessImporterHost;
#else
importer_host_ = new ImporterHost;
#endif
importer_host_->SetObserver(this);
importer_host_->set_browser(
chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment