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

Side by Side Diff: chrome/browser/process_singleton.h

Issue 10702159: Implement lock file for windows profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored to production code. Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PROCESS_SINGLETON_H_ 5 #ifndef CHROME_BROWSER_PROCESS_SINGLETON_H_
6 #define CHROME_BROWSER_PROCESS_SINGLETON_H_ 6 #define CHROME_BROWSER_PROCESS_SINGLETON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 #if defined(OS_WIN) 165 #if defined(OS_WIN)
166 // This ugly behemoth handles startup commands sent from another process. 166 // This ugly behemoth handles startup commands sent from another process.
167 LRESULT OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds); 167 LRESULT OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds);
168 168
169 bool EscapeVirtualization(const FilePath& user_data_dir); 169 bool EscapeVirtualization(const FilePath& user_data_dir);
170 170
171 HWND remote_window_; // The HWND_MESSAGE of another browser. 171 HWND remote_window_; // The HWND_MESSAGE of another browser.
172 HWND window_; // The HWND_MESSAGE window. 172 HWND window_; // The HWND_MESSAGE window.
173 bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment. 173 bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment.
174 HANDLE lock_file_;
174 #elif defined(OS_LINUX) || defined(OS_OPENBSD) 175 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
175 // Return true if the given pid is one of our child processes. 176 // Return true if the given pid is one of our child processes.
176 // Assumes that the current pid is the root of all pids of the current 177 // Assumes that the current pid is the root of all pids of the current
177 // instance. 178 // instance.
178 bool IsSameChromeInstance(pid_t pid); 179 bool IsSameChromeInstance(pid_t pid);
179 180
180 // Extract the process's pid from a symbol link path and if it is on 181 // Extract the process's pid from a symbol link path and if it is on
181 // the same host, kill the process, unlink the lock file and return true. 182 // the same host, kill the process, unlink the lock file and return true.
182 // If the process is part of the same chrome instance, unlink the lock file 183 // If the process is part of the same chrome instance, unlink the lock file
183 // and return true without killing it. 184 // and return true without killing it.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 #endif 222 #endif
222 223
223 // If messages are received in the locked state, the corresponding command 224 // If messages are received in the locked state, the corresponding command
224 // lines are saved here to be replayed later. 225 // lines are saved here to be replayed later.
225 std::vector<DelayedStartupMessage> saved_startup_messages_; 226 std::vector<DelayedStartupMessage> saved_startup_messages_;
226 227
227 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); 228 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton);
228 }; 229 };
229 230
230 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ 231 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/process_singleton_win.cc » ('j') | chrome/browser/process_singleton_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698