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

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

Issue 12096114: Extract locking behaviour from ProcessSingleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed merge. Created 7 years, 9 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
Index: chrome/browser/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index bada01d575b2a70c69128f78f4cf6021fad1f0dd..399c03ffec23fa8ae2bc1f50573e684b1dbad7e9 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -28,7 +28,6 @@
#include "chrome/browser/importer/importer_list.h"
#include "chrome/browser/importer/importer_progress_dialog.h"
#include "chrome/browser/importer/importer_progress_observer.h"
-#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
@@ -622,16 +621,8 @@ void AutoImport(
Profile* profile,
bool homepage_defined,
int import_items,
- int dont_import_items,
- ProcessSingleton* process_singleton) {
+ int dont_import_items) {
#if !defined(USE_AURA)
- // We need to avoid dispatching new tabs when we are importing because
- // that will lead to data corruption or a crash. Because there is no UI for
- // the import process, we pass NULL as the window to bring to the foreground
- // when a CopyData message comes in; this causes the message to be silently
- // discarded, which is the correct behavior during the import process.
- process_singleton->Lock(NULL);
-
scoped_refptr<ImporterHost> importer_host;
// TODO(csilv,mirandac): Out-of-process import has only been qualified on
// MacOS X, so we will only use it on that platform since it is required.
@@ -707,7 +698,6 @@ void AutoImport(
content::RecordAction(UserMetricsAction("FirstRunDef_Accept"));
- process_singleton->Unlock();
first_run::CreateSentinel();
#endif // !defined(USE_AURA)
did_perform_profile_import = true;

Powered by Google App Engine
This is Rietveld 408576698