Commit graph

26 commits

Author SHA1 Message Date
Cheng Zhao
1ff872519c posix: Fix assertion when freeing ProcessSingleton 2018-01-03 19:47:01 +09:00
Cheng Zhao
104585e772 Do not create DIR_USER_DATA on IO thread
It would slowdown the startup time of apps since we have wait for two
message posts between threads.
2018-01-03 19:07:24 +09:00
Cheng Zhao
952928dc79 Singleton must be created on request
The creation of singleton relies on the `userData` dir, which can be
changed by user, we have to ensure singleton uses the `userData` dir set
by user.
2018-01-03 18:59:12 +09:00
deepak1556
88e53b1b5e REVIEW: destroy process singleton on sequence where IO is allowed 2018-01-02 16:37:07 +09:00
Aleksei Kuzmin
ac8c205fd7 Replace deprecated base::NonThreadSafe in chrome in favor of SequenceChecker.
https://codereview.chromium.org/2911983003
2017-11-24 10:58:16 +09:00
Cheng Zhao
b7119b5756 Create watcher when message loop is ready 2017-09-20 11:58:32 +09:00
Samuel Attard
0ab83b301d Refactor as per @zcbenz comments
Also fix issue where we run the single instance callback *not* on the UI thread,
this apparently results in a hung process.
2017-09-20 11:58:32 +09:00
Samuel Attard
28900a9b63 Fix app.makeSingleInstance hanging on posix systems
Wait for the IO thread to be a thing before attempting to listen on the socket

Fixes #9880
2017-09-20 11:58:32 +09:00
Cheng Zhao
9f94a0b246 Update Singleton code 2017-04-27 16:34:52 +09:00
Cheng Zhao
eb3b77f43b ScopedTempDir::path is replaced with GetPath 2017-02-06 10:34:29 -08:00
Paul Betts
7dd1ebc734 Fix oops typos 2016-10-11 14:02:29 -07:00
Paul Betts
06065d1c5d Instead of gating the path shortening to MAS_BUILD, figure it out at runtime 2016-10-11 13:06:29 -07:00
Paul Betts
e84ae6e2aa Add a method to determine whether we're in the Apple sandbox 2016-10-11 13:06:29 -07:00
Cheng Zhao
1ba3907038 Update to API changes of Chrome 52 2016-07-04 15:32:43 +09:00
Brian R. Bondy
ce7c1023d5 Minimum fixes needed for chromium_src 2016-05-13 11:07:17 +09:00
Cheng Zhao
4435cdc576 Create user_data_dir before creating singleton lock 2016-04-27 21:52:50 +09:00
Cheng Zhao
0900762507 Make the length of SingletonSocket's path as short as we can 2016-04-21 13:58:11 +09:00
Cheng Zhao
5fae63a2f5 Fix compilation errors on OS X 2016-03-10 17:06:21 +09:00
Cheng Zhao
73e7773d84 Update to API changes of Chrome 47 2015-12-07 19:56:23 +08:00
Cheng Zhao
6bfe06ec4e Pass original argv in callback 2015-10-22 19:02:21 +08:00
Cheng Zhao
93a3a946f3 posix: Pass original command line 2015-10-22 17:43:55 +08:00
Cheng Zhao
230f2760e7 linux: Delay creating watcher until message loop is ready 2015-10-22 15:57:37 +08:00
Cheng Zhao
f01e84a418 linux: Delay listening to socket until message loop is ready 2015-10-22 15:54:58 +08:00
Cheng Zhao
310954713f Simplify the usage of singleton 2015-10-22 14:59:12 +08:00
Paul Betts
5886398f22 Port our changes over 2015-10-20 14:24:45 -07:00
Paul Betts
7491d5cfb5 Copy back the original versions of Chromium files in 2015-10-20 14:05:07 -07:00