summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_shutdown.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move pref_{member,service} and important_file_writer from chrome/commonphajdan.jr@chromium.org2010-02-191-1/+1
| | | | | | | | | | | | | to chrome/browser. This is a part of an effort to remove bad dependency of chrome/common on chrome/browser. TEST=unit_tests and ui_tests, just moving code BUG=none Review URL: http://codereview.chromium.org/621004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39428 0039d316-1c4b-4281-b951-d872f2087c98
* Do not try to swap chrome.exe if machine is shutting down.kuchhal@chromium.org2010-01-271-1/+2
| | | | | | | | | BUG=18063 TEST=Installer an update while Chrome is running. Log out of machine without closing Chrome first and make sure sure Chrome gets updated cleanly whenever it is launched next. Review URL: http://codereview.chromium.org/553079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37202 0039d316-1c4b-4281-b951-d872f2087c98
* Reattempt at r465143. The UI tests rely too heavily on the current behavior ↵andybons@chromium.org2009-12-151-0/+6
| | | | | | | | | | | | | of closing the last window indicating exiting the entire app, so that is left alone for now with a TODO added. From the old description: Mac: Fixes bug where extension background hosts were being cleared when the last window was closed. It assumed that this meant the app was closing. Not the case with Mac apps. Added a mac-only notification APP_TERMINATED and use that to perform cleanup upon shutdown. TEST=More description in the bug, but basically just make sure that background views stick around even after you've closed the last window. BUG=28666 Review URL: http://codereview.chromium.org/502012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34580 0039d316-1c4b-4281-b951-d872f2087c98
* Rolling back r34316 due to tab_switching_test failing. TBR=scherkusandybons@chromium.org2009-12-111-6/+0
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34374 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Fixes bug where extension background hosts were being cleared when the ↵andybons@chromium.org2009-12-111-0/+6
| | | | | | | | | | last window was closed. It assumed that this meant the app was closing. Not the case with Mac apps. Added a mac-only notification APP_TERMINATED and use that to perform cleanup upon shutdown. TEST=More description in the bug, but basically just make sure that background views stick around even after you've closed the last window. BUG=28666 Review URL: http://codereview.chromium.org/465143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34316 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: Eliminte locking from PrefetchObserver and DnsMaster in favor of ↵eroman@chromium.org2009-12-081-7/+1
| | | | | | | | | | | | | | | | | making these classes non-threadsafe. Conceptually, PrefetchObserver and DnsMaster live on the IO thread, and their methods can only be called from the IO thread. In the cases where calls do need to be made from the UI thread, we post a task to be run on the IO loop and return without blocking. The only time where we block is during shutdown, when we must wait on the IO thread to get us the startup list and referral list. BUG=25335 Review URL: http://codereview.chromium.org/300032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34066 0039d316-1c4b-4281-b951-d872f2087c98
* Move last shutdown file access off the UI thread and onto the file thread.jam@chromium.org2009-11-251-28/+45
| | | | | | Review URL: http://codereview.chromium.org/437049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33056 0039d316-1c4b-4281-b951-d872f2087c98
* Third patch in getting rid of caching MessageLoop pointers and always using ↵jam@chromium.org2009-11-021-3/+3
| | | | | | | | | | ChromeThread instead. BUG=25354 Review URL: http://codereview.chromium.org/342068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30687 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile failure due to bad merge.pkasting@chromium.org2009-10-021-5/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27893 0039d316-1c4b-4281-b951-d872f2087c98
* Convert users of RenderProcessHost iterator to all use same style. The key ↵pkasting@chromium.org2009-10-021-5/+5
| | | | | | | | | | | | | | motivator for this is that at least one old place actually did the wrong thing in its loop and failed to call functions on anything but the first host. This also makes many places slightly shorter. Remove an unneeded #include in web_cache_manager.h by converting it to a forward declaration. Update copyrights on touched files. BUG=none TEST=none Review URL: http://codereview.chromium.org/242104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27890 0039d316-1c4b-4281-b951-d872f2087c98
* Any time we are shutting down a tab, try to use fast shutdown.estade@chromium.org2009-10-021-26/+26
| | | | | | | | | BUG=http://crbug.com/5638 TEST=existing tab strip model tests, Fast shutdown ui tests, new tab strip model fast shutdown test Review URL: http://codereview.chromium.org/235050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27865 0039d316-1c4b-4281-b951-d872f2087c98
* linux: drop temp_scaffolding_stubsevan@chromium.org2009-09-251-2/+6
| | | | | | | | | It was mostly unneeded, but I had to excise the last bits of RLZ and move some NOTIMPLEMENTED bits to where they belong. Review URL: http://codereview.chromium.org/219042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27161 0039d316-1c4b-4281-b951-d872f2087c98
* Disable browser shutdown measurements on non-Windows platforms.agl@chromium.org2009-09-121-0/+6
| | | | | | | | | BUG=21489 http://codereview.chromium.org/199103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26058 0039d316-1c4b-4281-b951-d872f2087c98
* Remove RenderProcessHost::size(). With Pawel's change, size() isn't necessarilybrettw@chromium.org2009-08-181-5/+2
| | | | | | | | | | | | | correct, and it was badly named and needed fixing anyway. This patch just removes it. There were a few debugging places that used it which I just removed, since I think they're old and haven't been useful lately. The non-trivial changes were in the histogram code, it now counts them slightly differently. Review URL: http://codereview.chromium.org/171051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23622 0039d316-1c4b-4281-b951-d872f2087c98
* Remove an unused header from proxy_service.h.ericroman@google.com2009-08-181-0/+1
| | | | | | Review URL: http://codereview.chromium.org/164545 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23615 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor IDMap to support safe removing of elements during iteration.phajdan.jr@chromium.org2009-08-171-5/+6
| | | | | | | | | TEST=Covered by unit_tests and other automated tests. http://crbug.com/19202 Review URL: http://codereview.chromium.org/164518 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23572 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some debugging code in hopes of tracking down asky@chromium.org2009-07-011-0/+4
| | | | | | | | | | | | | | | | crash. Specifically: . Adds a CHECK to IDMap that evaluates to true if adding NULL. The default isn't to do this check. . browser_shutdown CHECKs if the # RPHs changes while iterating through the RPHs. BUG=15615 TEST=none Review URL: http://codereview.chromium.org/150181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19779 0039d316-1c4b-4281-b951-d872f2087c98
* Adds toplevel app/ directory and moves ResourceBundle into it.ben@chromium.org2009-05-051-1/+1
| | | | | | | | | | | No changes to resource bundle yet, just the move to keep this CL as compact as possible. Adds new vcproj and gyp file for app dir. http://crbug.com/11387 Review URL: http://codereview.chromium.org/100354 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15264 0039d316-1c4b-4281-b951-d872f2087c98
* ImportantFileWriterphajdan.jr@chromium.org2009-04-281-1/+1
| | | | | | | | | | | | | | Introducing a class for writing important files, preventing their corruption during writing. Switched PrefService to use it. Other classes will be switched in future changesets. TEST=This may affect things using preferences. Make sure that changes in preferences don't get lost, and that you don't get excessive disk activity when changing preferences. http://crbug.com/10618 Review URL: http://codereview.chromium.org/83001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14717 0039d316-1c4b-4281-b951-d872f2087c98
* Remove more unneeded scaffolding.thestig@chromium.org2009-04-081-7/+1
| | | | | | Review URL: http://codereview.chromium.org/63129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13376 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor plugin process code which checks with the browser process before ↵jam@chromium.org2009-03-271-6/+0
| | | | | | | | | | | shutdown, to avoid races in which the browser process thinks the process is fine to use while it's shutting down. I also removed PluginProcess/WorkerProcess since they didn't have any code in them now. I removed the plugin process code which waits 10 seconds before shutting itself down. That was a premature optimization, since testing with/without this didn't show any difference (see http://www/~jabdelmalek/chrome/test/plugins/processes.html). In both cases, the plugin on a page would get recreated in less than 100ms, even with reusing or starting a plugin process from scratch. We already spawn new renderer processes on back and forth if it's a different origin, and the plugin will be in the cache anyways. Review URL: http://codereview.chromium.org/53091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12703 0039d316-1c4b-4281-b951-d872f2087c98
* Use string for Histogram names since these are all ASCII anyway.dsh@google.com2009-02-241-12/+12
| | | | | | | | Wide-character literals cause problems between platforms. Review URL: http://codereview.chromium.org/28046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10276 0039d316-1c4b-4281-b951-d872f2087c98
* Make plugin_service.cc compile on Posix.jhawkins@chromium.org2009-02-201-1/+1
| | | | | | Review URL: http://codereview.chromium.org/20531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10102 0039d316-1c4b-4281-b951-d872f2087c98
* Persist info about subresources on pages for DNS pre-resolutionjar@chromium.org2009-02-171-0/+6
| | | | | | | | | | | | | | | | | | | | | The DNS pre-resolution system already "learns" what domains are commonly needed when rendering sub-resources of a page at a given domain. This patch saves (some of) the information learned into a persistent pref, and restores it on startup. For now, I put in a wimpy pruning of the list each time I save, so that the list will not grow endlessly from session to session. I probably need a better pruning algorithm, such as one that prunes after a given amount of time, rather than only during shutdown. For now, this should get a lot of nice results, and provide slightly larger than needed lists to users that have long lived sessions, which is similar to the current performance, where I didn't persist any info, and only pruned (actually discarded) all learned info at shutdown. r=mbelshe Review URL: http://codereview.chromium.org/21374 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9912 0039d316-1c4b-4281-b951-d872f2087c98
* Make browser_shudown.cc compile on Posix. This is r9835 with a fix for the ↵jhawkins@chromium.org2009-02-161-11/+17
| | | | | | | | mac build. Review URL: http://codereview.chromium.org/20393 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9848 0039d316-1c4b-4281-b951-d872f2087c98
* Rollback r9835 and r9837: Mac build broken.mal@chromium.org2009-02-151-17/+11
| | | | | | | | | | | | | | r9835: Make browser_shutdown.cc compile on Posix. Review URL: http://codereview.chromium.org/20384 r9837: Fix the mac build. Add a stubbed ResourceBundle::CleanupSharedInstance. Review URL: http://codereview.chromium.org/20387 TBR= jhawkins Review URL: http://codereview.chromium.org/21385 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9840 0039d316-1c4b-4281-b951-d872f2087c98
* Make browser_shutdown.cc compile on Posix.jhawkins@chromium.org2009-02-151-11/+17
| | | | | | Review URL: http://codereview.chromium.org/20384 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9835 0039d316-1c4b-4281-b951-d872f2087c98
* Adds cleanup code to RLZ so that we don't leak an OmniBoxUsageObserversky@google.com2009-01-281-0/+5
| | | | | | | | | | | | on shutdown. This came up in running in process ui tests through purify. BUG=none TEST=none Review URL: http://codereview.chromium.org/19428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8830 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a variable indicating whether resources should be deleted onsky@google.com2009-01-281-1/+4
| | | | | | | | | | | | | shutdown. Normally it's true, but I'm going to set it to false for in process ui tests. I can't delete the ResourceBundle for these tests as many classes cache SkBitmaps from the resource bundle in statics. BUG=none TEST=none Review URL: http://codereview.chromium.org/19609 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8795 0039d316-1c4b-4281-b951-d872f2087c98
* Modifies shutdown/startup in the following manner:sky@google.com2009-01-271-0/+3
| | | | | | | | | | | | | | | | | . Before registering the scheme 'chrome' with GURL we make sure it isn't already registered. I need this as I'm going to invoke BrowserMain multiple times and didn't want the list of schemes to have n-chromes. . Removes ResourceBundle::CleanupSharedInstance from browser_shutdown. We do this from BrowserMain already, so there is no need in doing it here. BUG=none TEST=none Review URL: http://codereview.chromium.org/18861 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8768 0039d316-1c4b-4281-b951-d872f2087c98
* Adds call to unload plugins on shutdown.sky@google.com2009-01-231-1/+7
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/18715 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8562 0039d316-1c4b-4281-b951-d872f2087c98
* Move files out of browser and into either renderer_host or tab_contents.brettw@chromium.org2009-01-221-2/+2
| | | | | | | This also fixes a crash in the web contents unit test in a commented-out test and re-enable it. Review URL: http://codereview.chromium.org/18504 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8470 0039d316-1c4b-4281-b951-d872f2087c98
* Move functions required by the rest of the browser from RenderProcessHost to ↵brettw@chromium.org2009-01-161-1/+1
| | | | | | | | an interface and move the implementation to BrowserRenderProcessHost. This will allow me to write render view unit tests without using the actual renderer, but there are no tests yet. Review URL: http://codereview.chromium.org/18132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8188 0039d316-1c4b-4281-b951-d872f2087c98
* Move metrics files into a subdirben@chromium.org2009-01-161-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18302 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8156 0039d316-1c4b-4281-b951-d872f2087c98
* WaitableEvent is the replacement for Windows events. Previously in the code, ↵agl@chromium.org2009-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a HANDLE from CreateEvent was used for signaling, both within a process and across processes. WaitableEvent is the cross platform replacement for this. To convert: * HANDLE -> base::WaitableEvent* * ScopedHandle -> scoped_ptr<base::WaitableEvent> * CreateEvent -> new base::WaitableEvent * SetEvent -> base::WaitableEvent::Signal * ResetEvent -> base::WaitableEvent::Reset * ObjectWatcher -> base::WaitableEventWatcher * WaitForMultipleObjects -> static base::WaitableEvent::WaitMany ObjectWatcher remains for Windows specific code. WaitableEventWatcher has an identical interface save, * It uses WaitableEvents, not HANDLEs * It returns void from StartWatching and StopWatcher, rather than errors. System internal errors are fatal to the address space IMPORTANT: There are semantic differences between the different platforms. WaitableEvents on Windows are implemented on top of events. Windows events work across process and this is used mostly for modal dialog support. Windows events can be duplicated with DuplicateHandle. On other platforms, WaitableEvent works only within a single process. In the future we shall have to replace the current uses of cross-process events with IPCs. BEWARE: HANDLE, on Windows, is a void *. Since any pointer type coerces to void *, you can pass a WaitableEvent * where a HANDLE is expected without any build-time errors. Review URL: http://codereview.chromium.org/16554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8126 0039d316-1c4b-4281-b951-d872f2087c98
* * Try to rename chrome exes in shutdown path as well.kuchhal@chromium.org2008-11-121-0/+5
| | | | | | | | BUG=1463346 Review URL: http://codereview.chromium.org/10805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5313 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+3
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Remove more shared_event that I missed last timeagl@chromium.org2008-10-161-1/+0
| | | | | | | | | TBR=evan Review URL: http://codereview.chromium.org/7397 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3485 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Use %ls instead of %s in wprintf format strings for wchar_t fields.mmentovai@google.com2008-08-141-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@846 0039d316-1c4b-4281-b951-d872f2087c98
* Enabling sync_channel in the browser to allow accessibility code making ↵jcampan@google.com2008-08-121-0/+4
| | | | | | | | | blocking calls. This replaces my previous CL that was somehow duplicating some of these functionalities. BUG=None TEST=Run the unit tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@691 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+204
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98