| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "base/sys_string_conversions.h" | 73 #include "base/sys_string_conversions.h" |
| 74 #include "base/utf_string_conversions.h" | 74 #include "base/utf_string_conversions.h" |
| 75 #include "base/time.h" | 75 #include "base/time.h" |
| 76 #include "base/timer.h" | 76 #include "base/timer.h" |
| 77 #include "chrome/browser/browser_process.h" | 77 #include "chrome/browser/browser_process.h" |
| 78 #include "chrome/browser/browser_thread.h" | 78 #include "chrome/browser/browser_thread.h" |
| 79 #if defined(TOOLKIT_GTK) | 79 #if defined(TOOLKIT_GTK) |
| 80 #include "chrome/browser/gtk/process_singleton_dialog.h" | 80 #include "chrome/browser/gtk/process_singleton_dialog.h" |
| 81 #endif | 81 #endif |
| 82 #include "chrome/browser/io_thread.h" | 82 #include "chrome/browser/io_thread.h" |
| 83 #include "chrome/browser/profile.h" | 83 #include "chrome/browser/profiles/profile.h" |
| 84 #include "chrome/browser/profile_manager.h" | 84 #include "chrome/browser/profiles/profile_manager.h" |
| 85 #include "chrome/browser/ui/browser_init.h" | 85 #include "chrome/browser/ui/browser_init.h" |
| 86 #include "chrome/common/chrome_constants.h" | 86 #include "chrome/common/chrome_constants.h" |
| 87 #include "chrome/common/chrome_paths.h" | 87 #include "chrome/common/chrome_paths.h" |
| 88 #include "chrome/common/chrome_switches.h" | 88 #include "chrome/common/chrome_switches.h" |
| 89 #include "grit/chromium_strings.h" | 89 #include "grit/chromium_strings.h" |
| 90 #include "grit/generated_resources.h" | 90 #include "grit/generated_resources.h" |
| 91 #include "net/base/net_util.h" | 91 #include "net/base/net_util.h" |
| 92 | 92 |
| 93 const int ProcessSingleton::kTimeoutInSeconds; | 93 const int ProcessSingleton::kTimeoutInSeconds; |
| 94 | 94 |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 sock)); | 989 sock)); |
| 990 | 990 |
| 991 return true; | 991 return true; |
| 992 } | 992 } |
| 993 | 993 |
| 994 void ProcessSingleton::Cleanup() { | 994 void ProcessSingleton::Cleanup() { |
| 995 UnlinkPath(socket_path_.value()); | 995 UnlinkPath(socket_path_.value()); |
| 996 UnlinkPath(cookie_path_.value()); | 996 UnlinkPath(cookie_path_.value()); |
| 997 UnlinkPath(lock_path_.value()); | 997 UnlinkPath(lock_path_.value()); |
| 998 } | 998 } |
| OLD | NEW |