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

Unified Diff: chrome/browser/first_run/first_run_posix.cc

Issue 12670013: Out-of-process import on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of https://codereview.chromium.org/15736014/ Created 7 years, 7 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/browser/first_run/first_run_mac.mm ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run_posix.cc
diff --git a/chrome/browser/first_run/first_run_posix.cc b/chrome/browser/first_run/first_run_posix.cc
index e66a27e10c87e95452ca9a5b5b6dd25f853c8296..7498a90ef4bcb33fed0d524f4521fce8eef7983e 100644
--- a/chrome/browser/first_run/first_run_posix.cc
+++ b/chrome/browser/first_run/first_run_posix.cc
@@ -6,15 +6,11 @@
#include "base/file_util.h"
#include "base/files/file_path.h"
-#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/prefs/pref_service.h"
-#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/first_run/first_run_dialog.h"
#include "chrome/browser/first_run/first_run_internal.h"
-#include "chrome/browser/importer/importer_host.h"
-#include "chrome/browser/importer/importer_list.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
@@ -22,7 +18,6 @@
#include "chrome/common/startup_metric_utils.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/master_preferences.h"
-#include "chrome/installer/util/master_preferences_constants.h"
namespace first_run {
namespace internal {
@@ -63,52 +58,6 @@ bool GetFirstRunSentinelFilePath(base::FilePath* path) {
return true;
}
-bool ImportSettings(Profile* profile,
- ImporterHost* importer_host,
- scoped_refptr<ImporterList> importer_list,
- int items_to_import) {
- const importer::SourceProfile& source_profile =
- importer_list->GetSourceProfileAt(0);
-
- // Ensure that importers aren't requested to import items that they do not
- // support. If there is no overlap, skip.
- items_to_import &= source_profile.services_supported;
- if (items_to_import == 0)
- return true;
-
- ImportEndedObserver observer;
- importer_host->SetObserver(&observer);
- importer_host->StartImportSettings(source_profile,
- profile,
- items_to_import,
- new ProfileWriter(profile));
- // If the import process has not errored out, block on it.
- if (!observer.ended()) {
- observer.set_should_quit_message_loop();
- MessageLoop::current()->Run();
- }
-
- // Unfortunately there's no success/fail signal in ImporterHost.
- return true;
-}
-
-void SetImportPreferencesAndLaunchImport(
- MasterPrefs* out_prefs,
- installer::MasterPreferences* install_prefs) {
- std::string import_bookmarks_path;
- install_prefs->GetString(
- installer::master_preferences::kDistroImportBookmarksFromFilePref,
- &import_bookmarks_path);
- if (!import_bookmarks_path.empty()) {
- // There are bookmarks to import from a file.
- base::FilePath path = base::FilePath::FromWStringHack(UTF8ToWide(
- import_bookmarks_path));
- if (!ImportBookmarks(path)) {
- LOG(WARNING) << "silent bookmark import failed";
- }
- }
-}
-
bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs) {
// The EULA is only handled on Windows.
return true;
@@ -116,14 +65,3 @@ bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs) {
} // namespace internal
} // namespace first_run
-
-namespace first_run {
-
-// TODO(port): Import switches need to be ported to both Mac and Linux. Not all
-// import switches here are implemented for Linux. None are implemented for Mac
-// (as this function will not be called on Mac).
-int ImportNow(Profile* profile, const CommandLine& cmdline) {
- return internal::ImportBookmarkFromFileIfNeeded(profile, cmdline);
-}
-
-} // namespace first_run
« no previous file with comments | « chrome/browser/first_run/first_run_mac.mm ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698