summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton.h
Commit message (Collapse)AuthorAgeFilesLines
* Move scoped_temp_dir and scoped_native_library back from base/memory to base.thakis@chromium.org2011-05-191-1/+1
| | | | | | | | | | | It looks like they got moved accidentally in http://codereview.chromium.org/6714032 BUG=none TEST=none Review URL: http://codereview.chromium.org/7048007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86010 0039d316-1c4b-4281-b951-d872f2087c98
* first-run: Pull IsBrowserAlreadyRunning() out of upgrade_util_win.h.tfarina@chromium.org2011-04-151-1/+1
| | | | | | | | | | | | | | This concept is not specific to upgrade path and thus shouldn't belong there. Move it to a new header file called browser_util_win.h as it's more appropriate. BUG=79203 TEST=None R=jhawkins@chromium.org Review URL: http://codereview.chromium.org/6861001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81691 0039d316-1c4b-4281-b951-d872f2087c98
* first-run: Reland refactor of Upgrade class into upgrade_util API.tfarina@chromium.org2011-04-131-1/+2
| | | | | | | | | | | | | This fix linux_chromeos build by adding an appropriate #ifdef on upgrade_util_linux.cc. BUG=79203 TEST=None TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/6839021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81431 0039d316-1c4b-4281-b951-d872f2087c98
* Broke ARM compile.siggi@chromium.org2011-04-131-2/+1
| | | | | | | | Revert 81409 - first-run: Refactor Upgrade class into a common upgrade_util API.BUG=79203TEST=NoneR=jhawkins@chromium.orgReview URL: http://codereview.chromium.org/6840003 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/6835022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81412 0039d316-1c4b-4281-b951-d872f2087c98
* first-run: Refactor Upgrade class into a common upgrade_util API.tfarina@chromium.org2011-04-131-1/+2
| | | | | | | | | | | BUG=79203 TEST=None R=jhawkins@chromium.org Review URL: http://codereview.chromium.org/6840003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81409 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Make the toast more reliable and less dangerouscpu@chromium.org2011-03-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | The current toast (re-activation) experiment suffers from the following problems: 1- False negative: the toast can be triggered even if chrome is being used 2- Nested message loop crash: If chrome tries to run while the toast is being shown, it crashes This change addresses both conditions. Before running the toast we leverage the process_singleton to detect another instance. If so we abort with "no thanks". When showing the toast and its nested message loop we take the process_singleton lock which inhibits dispatch of the wm_copydata message which spawns new tabs in the current process if we try to span a new tab while in the nested message loop we crash. BUG=32026 TES=see bug Review URL: http://codereview.chromium.org/6625037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77214 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-051-1/+1
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Move non_thread_safe from base to base/threading and into the base namespace.brettw@chromium.org2011-01-011-2/+2
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6005010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70351 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: USE_X11 + OS_MACOSX = OS_POSIX.thestig@chromium.org2010-12-211-7/+9
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5856001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69854 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Lock profile against multiple uses.shess@chromium.org2010-10-141-1/+9
| | | | | | | | | | | | | | | Mac uses Launch Services to make sure one Chrome is started from the GUI, and AppleEvents and Launch Services to pass in URLs. When a developer or test launches multiple browsers against a profile, it fails in mysterious ways. This adds a profile lock to flush out any hidden assumptions. BUG=22163,58986,59061 TEST=Run Chromium twice with same --user-data-dir. Second instances shouldn't launch. Review URL: http://codereview.chromium.org/3777003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62659 0039d316-1c4b-4281-b951-d872f2087c98
* Move the SingletonSocket to a temporary directorydavidben@chromium.org2010-08-271-0/+9
| | | | | | | | | | | | | | | | This is to workaround problems on certain network filesystems (notably AFS) which do not support Unix domain sockets. We move the sockets into a temporary folder and symlink. To avoid the possibility of a dangling link to a missing (and later intercepted) remote directory, we create and check cookie files and rely on the stickiness of /tmp/ to avoid a race condition in the check. R=mattm BUG=44606 TEST=ProcessSingletonLinuxTest.* Review URL: http://codereview.chromium.org/2838034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57623 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 6)thestig@chromium.org2010-08-191-2/+5
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56641 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* ProcessSingleton(all): create the lock immediately after failing to connect ↵mattm@chromium.org2010-05-281-1/+11
| | | | | | | | | | | | | to an existing process. ProcessSingletonLinux: if creating the lock fails, try to notify again. BUG=44417 TEST=manual Review URL: http://codereview.chromium.org/2066014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48533 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 47875 - ProcessSingleton(all): create the lock immediately after ↵thestig@chromium.org2010-05-211-11/+1
| | | | | | | | | | | | | | | | failing to connect to an existing process. ProcessSingletonLinux: if creating the lock fails, try to notify again. BUG=44417 TEST=manual Review URL: http://codereview.chromium.org/2066014 TBR=mattm@chromium.org Review URL: http://codereview.chromium.org/2125015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47893 0039d316-1c4b-4281-b951-d872f2087c98
* ProcessSingleton(all): create the lock immediately after failing to connect ↵mattm@chromium.org2010-05-211-1/+11
| | | | | | | | | | | | | to an existing process. ProcessSingletonLinux: if creating the lock fails, try to notify again. BUG=44417 TEST=manual Review URL: http://codereview.chromium.org/2066014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47875 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix startup race between creating the SingletonLock and listening on ↵mattm@chromium.org2010-04-071-2/+4
| | | | | | | | | | | SingletonSocket. BUG=39922 TEST=see bug Review URL: http://codereview.chromium.org/1612006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43801 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-171-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41812 0039d316-1c4b-4281-b951-d872f2087c98
* BSD ifdefs, etc. necessary for chrome/pvalchev@google.com2010-03-091-3/+3
| | | | | | Review URL: http://codereview.chromium.org/656009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41067 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: rejigger how initialization works.evan@chromium.org2009-10-121-1/+4
| | | | | | | | | | I'm attempting to clean up CommandLine. This change rearranges how initialization is done. I am trying to eliminate redundant functions; more will come in subsequent changes. Review URL: http://codereview.chromium.org/273018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28752 0039d316-1c4b-4281-b951-d872f2087c98
* Move native_widget_types and gtk_native_view_id_manager from base/gfx tobrettw@chromium.org2009-10-111-1/+1
| | | | | | | | | | | | app/gfx in preparation for removing the base_gfx project. This also moves base/window_impl.cc to app/win/window_impl because this file shouldn't be in base. TEST=none BUG=none Review URL: http://codereview.chromium.org/273017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28691 0039d316-1c4b-4281-b951-d872f2087c98
* linux: expose the ProcessSingleton timeout to speed testsevan@chromium.org2009-09-171-0/+7
| | | | | | | | | We have a 20-second timeout normally, but for testing purposes 1 second is plenty. Review URL: http://codereview.chromium.org/209018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26483 0039d316-1c4b-4281-b951-d872f2087c98
* Make ProcessSingletonLinux check the hostname to avoid multiple uses of a ↵mattm@chromium.org2009-08-211-1/+13
| | | | | | | | | | | | | profile over NFS. In order to avoid the singleton socket filename from exceeding the max socket name length, the socket is just named "SingletonSocket" and a new file "SingletonLock" is used for the hostname&pid. BUG=17549 TEST=see bug Review URL: http://codereview.chromium.org/174041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23930 0039d316-1c4b-4281-b951-d872f2087c98
* It's a copy of http://codereview.chromium.org/155772, with the fix for ↵suzhe@chromium.org2009-08-041-3/+6
| | | | | | | | | | | | | | | | valgrind test failure. This CL implements the second TODO item of issue 12343: 2) We should send back an ACK to the second process. If the second process doesn't get an ACK in the given timeout, it should kill the first process and go ahead and start. The approach of this CL is to append process id to the singleton's socket filename, such as "SingletonSocket-12345", and creates a symbol link "SingletonSocket" to the real socket file. In ProcessSingleton::NotifyOtherProcess() if it's successfully connected to "SingletonSocket" but no ACK received, then the original process can be killed by its process id retrieved from the symbol link. BUG=12343 ProcessSingleton Linux cleanups TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed. Review URL: http://codereview.chromium.org/160436 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22365 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 22144.suzhe@chromium.org2009-07-311-6/+3
| | | | | | | | still broke valgrind ui_tests. Review URL: http://codereview.chromium.org/159694 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22145 0039d316-1c4b-4281-b951-d872f2087c98
* It's a copy of http://codereview.chromium.org/155772, with the fix for ↵suzhe@chromium.org2009-07-311-3/+6
| | | | | | | | | | | | | | | | valgrind test failure. This CL implements the second TODO item of issue 12343: 2) We should send back an ACK to the second process. If the second process doesn't get an ACK in the given timeout, it should kill the first process and go ahead and start. The approach of this CL is to append process id to the singleton's socket filename, such as "SingletonSocket-12345", and creates a symbol link "SingletonSocket" to the real socket file. In ProcessSingleton::NotifyOtherProcess() if it's successfully connected to "SingletonSocket" but no ACK received, then the original process can be killed by its process id retrieved from the symbol link. BUG=http://crbug.com/12343 ProcessSingleton Linux cleanups TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed. Review URL: http://codereview.chromium.org/160436 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22144 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 21943.willchan@chromium.org2009-07-291-6/+3
| | | | | | | Broke valgrind ui_tests Review URL: http://codereview.chromium.org/160320 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21945 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Adds ACKs to ProcessSingletonLinux.willchan@chromium.org2009-07-291-3/+6
| | | | | | | | | | | | Patch contributed by suzhe@google.com (http://codereview.chromium.org/155772) BUG=http://crbug.com/12343 TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed. Review URL: http://codereview.chromium.org/159577 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21943 0039d316-1c4b-4281-b951-d872f2087c98
* Implement process singleton on linux so if the user tries totc@google.com2009-05-201-2/+17
| | | | | | | | | | | | | | open multiple chrome processes, the first one just opens a new window. This is based on http://codereview.chromium.org/88067 by Nikita Ofitserov (himikof). BUG=8073 Review URL: http://codereview.chromium.org/115572 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16528 0039d316-1c4b-4281-b951-d872f2087c98
* Fix multiple instances of first run dialog appearing when Chrome is started ↵robertshield@google.com2009-05-031-3/+9
| | | | | | | | | | again while a first run dialog is visible. Also cause the original first run dialog to come to foreground. BUG=http://crbug.com/10765 Review URL: http://codereview.chromium.org/99281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15170 0039d316-1c4b-4281-b951-d872f2087c98
* Removed zombie hunter codemaruel@chromium.org2009-03-231-3/+0
| | | | | | | | BUG=6468 Review URL: http://codereview.chromium.org/46076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12314 0039d316-1c4b-4281-b951-d872f2087c98
* Obey the XDG base directory spec and use ~/.config/chromium on Linux.evan@chromium.org2009-02-231-1/+1
| | | | | | | | | As discussed here: http://groups.google.com/group/chromium-dev/browse_thread/thread/41e9154311779e1a Review URL: http://codereview.chromium.org/27069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10225 0039d316-1c4b-4281-b951-d872f2087c98
* Implement skeletal ProcessSingleton on Linux to cut down on NOTIMPLEMENTED()s.evan@chromium.org2009-02-181-10/+24
| | | | | | | | | | | We now will refuse to run a second browser process if one is already running; making the second invocation bring up new windows in the first remains left to be implemented. Review URL: http://codereview.chromium.org/20448 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9980 0039d316-1c4b-4281-b951-d872f2087c98
* Rename MessageWindow to ProcessSingleton in anticipation of more refactoring.evan@chromium.org2009-02-181-0/+78
Review URL: http://codereview.chromium.org/20437 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9923 0039d316-1c4b-4281-b951-d872f2087c98