| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // On Linux, when the user tries to launch a second copy of chrome, we check | 5 // On Linux, when the user tries to launch a second copy of chrome, we check |
| 6 // for a socket in the user's profile directory. If the socket file is open we | 6 // for a socket in the user's profile directory. If the socket file is open we |
| 7 // send a message to the first chrome browser process with the current | 7 // send a message to the first chrome browser process with the current |
| 8 // directory and second process command line flags. The second process then | 8 // directory and second process command line flags. The second process then |
| 9 // exits. | 9 // exits. |
| 10 // | 10 // |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "base/command_line.h" | 60 #include "base/command_line.h" |
| 61 #include "base/eintr_wrapper.h" | 61 #include "base/eintr_wrapper.h" |
| 62 #include "base/file_path.h" | 62 #include "base/file_path.h" |
| 63 #include "base/file_util.h" | 63 #include "base/file_util.h" |
| 64 #include "base/logging.h" | 64 #include "base/logging.h" |
| 65 #include "base/message_loop.h" | 65 #include "base/message_loop.h" |
| 66 #include "base/path_service.h" | 66 #include "base/path_service.h" |
| 67 #include "base/process_util.h" | 67 #include "base/process_util.h" |
| 68 #include "base/rand_util.h" | 68 #include "base/rand_util.h" |
| 69 #include "base/safe_strerror_posix.h" | 69 #include "base/safe_strerror_posix.h" |
| 70 #include "base/stl_util-inl.h" | 70 #include "base/stl_util.h" |
| 71 #include "base/stringprintf.h" | 71 #include "base/stringprintf.h" |
| 72 #include "base/string_number_conversions.h" | 72 #include "base/string_number_conversions.h" |
| 73 #include "base/string_split.h" | 73 #include "base/string_split.h" |
| 74 #include "base/sys_string_conversions.h" | 74 #include "base/sys_string_conversions.h" |
| 75 #include "base/threading/platform_thread.h" | 75 #include "base/threading/platform_thread.h" |
| 76 #include "base/time.h" | 76 #include "base/time.h" |
| 77 #include "base/timer.h" | 77 #include "base/timer.h" |
| 78 #include "base/utf_string_conversions.h" | 78 #include "base/utf_string_conversions.h" |
| 79 #include "chrome/browser/browser_process.h" | 79 #include "chrome/browser/browser_process.h" |
| 80 #if defined(TOOLKIT_GTK) | 80 #if defined(TOOLKIT_GTK) |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 sock)); | 981 sock)); |
| 982 | 982 |
| 983 return true; | 983 return true; |
| 984 } | 984 } |
| 985 | 985 |
| 986 void ProcessSingleton::Cleanup() { | 986 void ProcessSingleton::Cleanup() { |
| 987 UnlinkPath(socket_path_); | 987 UnlinkPath(socket_path_); |
| 988 UnlinkPath(cookie_path_); | 988 UnlinkPath(cookie_path_); |
| 989 UnlinkPath(lock_path_); | 989 UnlinkPath(lock_path_); |
| 990 } | 990 } |
| OLD | NEW |