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

Unified Diff: chrome/browser/process_singleton_win.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/process_singleton_win.cc
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 5abe2e3c122eb88852ee4b531ebf9523511984e0..0f24dfc66b44e06f03046f14e4745739855911a2 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -255,8 +255,7 @@ bool ProcessSingleton::EscapeVirtualization(
ProcessSingleton::ProcessSingleton(
const base::FilePath& user_data_dir,
const NotificationCallback& notification_callback)
- : window_(NULL), locked_(false), foreground_window_(NULL),
- notification_callback_(notification_callback),
+ : window_(NULL), notification_callback_(notification_callback),
is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE),
user_data_dir_(user_data_dir) {
}
@@ -537,28 +536,6 @@ void ProcessSingleton::Cleanup() {
}
LRESULT ProcessSingleton::OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds) {
- // If locked, it means we are not ready to process this message because
- // we are probably in a first run critical phase.
- if (locked_) {
-#if defined(USE_AURA)
- NOTIMPLEMENTED();
-#else
- // Attempt to place ourselves in the foreground / flash the task bar.
- if (foreground_window_ != NULL && IsWindow(foreground_window_)) {
- SetForegroundWindow(foreground_window_);
robertshield 2013/03/27 14:51:38 This is at least a small change in behaviour in th
erikwright (departed) 2013/03/28 03:16:34 Done.
- } else {
- // Read the command line and store it. It will be replayed when the
- // ProcessSingleton becomes unlocked.
- CommandLine parsed_command_line(CommandLine::NO_PROGRAM);
- base::FilePath current_directory;
- if (ParseCommandLine(cds, &parsed_command_line, &current_directory))
- saved_startup_messages_.push_back(
- std::make_pair(parsed_command_line.argv(), current_directory));
- }
-#endif
- return TRUE;
- }
-
CommandLine parsed_command_line(CommandLine::NO_PROGRAM);
base::FilePath current_directory;
if (!ParseCommandLine(cds, &parsed_command_line, &current_directory))

Powered by Google App Engine
This is Rietveld 408576698