| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "base/file_path.h" | 62 #include "base/file_path.h" |
| 63 #include "base/logging.h" | 63 #include "base/logging.h" |
| 64 #include "base/message_loop.h" | 64 #include "base/message_loop.h" |
| 65 #include "base/path_service.h" | 65 #include "base/path_service.h" |
| 66 #include "base/platform_thread.h" | 66 #include "base/platform_thread.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-inl.h" |
| 71 #include "base/string_number_conversions.h" | 71 #include "base/string_number_conversions.h" |
| 72 #include "base/string_split.h" |
| 72 #include "base/sys_string_conversions.h" | 73 #include "base/sys_string_conversions.h" |
| 73 #include "base/utf_string_conversions.h" | 74 #include "base/utf_string_conversions.h" |
| 74 #include "base/time.h" | 75 #include "base/time.h" |
| 75 #include "base/timer.h" | 76 #include "base/timer.h" |
| 76 #include "chrome/browser/browser_init.h" | 77 #include "chrome/browser/browser_init.h" |
| 77 #include "chrome/browser/browser_process.h" | 78 #include "chrome/browser/browser_process.h" |
| 78 #include "chrome/browser/chrome_thread.h" | 79 #include "chrome/browser/chrome_thread.h" |
| 79 #if defined(TOOLKIT_GTK) | 80 #if defined(TOOLKIT_GTK) |
| 80 #include "chrome/browser/gtk/process_singleton_dialog.h" | 81 #include "chrome/browser/gtk/process_singleton_dialog.h" |
| 81 #endif | 82 #endif |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 sock)); | 989 sock)); |
| 989 | 990 |
| 990 return true; | 991 return true; |
| 991 } | 992 } |
| 992 | 993 |
| 993 void ProcessSingleton::Cleanup() { | 994 void ProcessSingleton::Cleanup() { |
| 994 UnlinkPath(socket_path_.value()); | 995 UnlinkPath(socket_path_.value()); |
| 995 UnlinkPath(cookie_path_.value()); | 996 UnlinkPath(cookie_path_.value()); |
| 996 UnlinkPath(lock_path_.value()); | 997 UnlinkPath(lock_path_.value()); |
| 997 } | 998 } |
| OLD | NEW |