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

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

Issue 174057: Modifies the Firefox import behavior such that if we're in first run, the imp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/importer.cc
===================================================================
--- chrome/browser/importer/importer.cc (revision 26169)
+++ chrome/browser/importer/importer.cc (working copy)
@@ -547,6 +547,15 @@
if (!firefox_lock_->HasAcquired()) {
// If fail to acquire the lock, we set the source unreadable and
// show a warning dialog.
+ // However, if we're running without a UI (silently) and trying to
+ // import just the home page, then import anyway. The home page setting
+ // is stored in an unlocked text file, so it is the only preference safe
+ // to import even if Firefox is running.
+ if (items == HOME_PAGE && first_run && this->headless_) {
+ AddRef();
+ InvokeTaskIfDone();
+ return;
+ }
is_source_readable_ = false;
ShowWarningDialog();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698