summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use GetSwitchValueASCII, so we don't use the deprecated versions.evan@chromium.org2009-12-171-3/+3
| | | | | | | | Patch from Thiago Farina <thiago.farina@gmail.com>. Review URL: http://codereview.chromium.org/498002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34811 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux hanging ui_tests and browser_tests by reverting posix signal ↵willchan@chromium.org2009-12-161-104/+31
| | | | | | | | | | | | | handler changes. Reverts: r34036 - "Make POSIX SIGTERM/SIGINT/SIGHUP handler async signal safe." r34096 - "Re-enable TCMalloc on Linux." This change depended on the posix signal handler change. BUG=http://crbug.com/30501 Review URL: http://codereview.chromium.org/502017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34632 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Comma delimit the various flip options. Redo the fixed testing server ↵willchan@chromium.org2009-12-151-0/+14
| | | | | | | | | | flags. Renames --testing-fixed-server to --testing-fixed-host. Adds --testing-fixed-http-port and --testing-fixed-https-port. Review URL: http://codereview.chromium.org/501032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34624 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the AsyncSlowStart experimentmbelshe@google.com2009-12-151-4/+0
| | | | | | | | | BUG=30144 TEST=none Review URL: http://codereview.chromium.org/491056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34620 0039d316-1c4b-4281-b951-d872f2087c98
* Speculative fix for a chrome browser crash which occurs with ChromeFrame. ↵ananta@chromium.org2009-12-151-2/+0
| | | | | | | | | | | | | | | | | | | | Based on the crash dump, the crash occurs when the external tab container is being destroyed which in turn takes down the automation provider and the channel, etc. All this occurs in the context of OleUninitialize, which executes after BrowserMain returns, i.e. the message loop is now invalid, thus causing a crash while attempting to post a task to it. Based on this call stack it looks like it happens due to the enable-renderer-accessisibility flag. Fix is to move the OleInitialize/OleUnitialize calls to Platform::WillInitializeMainMessageLoop and Platform::DidEndMainMessageLoop. The Platform::DidEndMainMessageLoop function now executes as a task which is posted to the message loop prior to quitting it. This would ensure that the cleanup happens correctly. Fixes http://code.google.com/p/chromium/issues/detail?id=30383 Bug=30383 Review URL: http://codereview.chromium.org/501011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34611 0039d316-1c4b-4281-b951-d872f2087c98
* Retry landing the chrome-as-chromeos-login-manager changecmasone@google.com2009-12-141-0/+8
| | | | | | | Old CL: http://codereview.chromium.org/449023 Review URL: http://codereview.chromium.org/488007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34463 0039d316-1c4b-4281-b951-d872f2087c98
* Make BrowserProcess::GetApplicationLocale thread safe and migratetony@chromium.org2009-12-101-7/+12
| | | | | | | | | | | | | | | | | callers of l10n_util::GetApplicationLocale to use this instead. In the browser process, it's wrong to call l10n_util::GetApplicationLocale with an empty string because then it won't consider the user pref value when resolving the locale. On Linux, it's also wrong to call l10n_util::GetApplicationLocale after startup because the call touches disk and on Linux, we assume that all of the program files can be deleted after startup (so updates in place can work). Review URL: http://codereview.chromium.org/476002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34206 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 34134 - Viewsbased login window for Chrome OS. Doesn't yet actually ↵jrg@chromium.org2009-12-091-8/+0
| | | | | | | | | | | do anything Review URL: http://codereview.chromium.org/449023 TBR=cmasone@google.com Review URL: http://codereview.chromium.org/467060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34135 0039d316-1c4b-4281-b951-d872f2087c98
* Views-based login window for Chrome OS. Doesn't yet actually do anythingcmasone@google.com2009-12-091-0/+8
| | | | | | Review URL: http://codereview.chromium.org/449023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34134 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 34110 - Fix leak of ShutdownDetector. Broke Mac startup_test.willchan@chromium.org2009-12-091-48/+30
| | | | | | | | | | | | For some reason I thought that nonjoinable threads would always delete their delegates. I was wrong. BUG=http://crbug.com/29675 Review URL: http://codereview.chromium.org/460144 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/460154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34121 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak of ShutdownDetector.willchan@chromium.org2009-12-091-30/+48
| | | | | | | | | For some reason I thought that non-joinable threads would always delete their delegates. I was wrong. BUG=http://crbug.com/29675 Review URL: http://codereview.chromium.org/460144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34110 0039d316-1c4b-4281-b951-d872f2087c98
* Make POSIX SIGTERM/SIGINT/SIGHUP handler async signal safe.willchan@chromium.org2009-12-081-31/+104
| | | | | | | | | | * Don't use LOG/CHECK. Replace with RAW_LOG/DCHECK (newly added to logging.h) * Don't directly post a task to the UI loop. Write to a magic pipe. Read this from a separate thread which will post to a task to the UI loop. BUG=http://crbug.com/29240 Review URL: http://codereview.chromium.org/460094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34036 0039d316-1c4b-4281-b951-d872f2087c98
* Change LOG(WARNING) to LOG(INFO) in a couple places.estade@chromium.org2009-12-021-4/+4
| | | | | | | | This prevents console spew when ctrl+c closing works gracefully. Review URL: http://codereview.chromium.org/462013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33619 0039d316-1c4b-4281-b951-d872f2087c98
* Kill holdback for Http Prioritization experiment. Turn on to 100%.willchan@chromium.org2009-12-021-10/+0
| | | | | | Review URL: http://codereview.chromium.org/458010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33608 0039d316-1c4b-4281-b951-d872f2087c98
* Move WinSock initialize earlier in the startup process. I ran intombelshe@google.com2009-12-011-5/+5
| | | | | | | | | | | | | | | | | | a case where my extension used the network; but because extensions are initialized earlier than WinSock init, the extension failed when trying to do a dns lookup. This only fails because it was in conjunction with the --single-process flag, so it is unlikely to effect others. Nonetheless, there is really no harm in moving winsock initialization to be very early. BUG=none TEST=none Review URL: http://codereview.chromium.org/454021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33486 0039d316-1c4b-4281-b951-d872f2087c98
* Remove another instance of using the transient pref service. This preftony@chromium.org2009-11-301-4/+0
| | | | | | | | | | | | is only read from the options dialog, the windows installer (a separate process) and a spot in safe browsing. The only one that matters is the safe browsing case. BUG=28992 Review URL: http://codereview.chromium.org/456004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33348 0039d316-1c4b-4281-b951-d872f2087c98
* Add -profile command line switchdavemoore@chromium.org2009-11-301-49/+42
| | | | | | Review URL: http://codereview.chromium.org/384062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33335 0039d316-1c4b-4281-b951-d872f2087c98
* Make SystemMonitor not a Singleton and move it out of basephajdan.jr@chromium.org2009-11-261-8/+4
| | | | | | | | | | | | | SystemMonitor makes an assumption that through its lifetime a MessageLoop exists and stays the same. It is difficult and error-prone to satisfy that when it is a Singleton. It has caused problems in the past. Additionally, extract HighResoltionTimerManager out of time_win.cc, eliminating yet another Singleton. TEST=none BUG=none Review URL: http://codereview.chromium.org/431008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33214 0039d316-1c4b-4281-b951-d872f2087c98
* Fix signal handlers so we don't fail a DCHECK.thestig@chromium.org2009-11-261-10/+11
| | | | | | | | BUG=none TEST=ctrl+c in debug mode doesn't cause a DCHECK failure. Review URL: http://codereview.chromium.org/442018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33168 0039d316-1c4b-4281-b951-d872f2087c98
* Move last shutdown file access off the UI thread and onto the file thread.jam@chromium.org2009-11-251-8/+7
| | | | | | Review URL: http://codereview.chromium.org/437049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33056 0039d316-1c4b-4281-b951-d872f2087c98
* Posix: Catch SIGHUP/SIGINT and do a clean shutdown.thestig@chromium.org2009-11-251-9/+31
| | | | | | | | BUG=28746 TEST=Ctrl+C = clean shutdown. Review URL: http://codereview.chromium.org/432019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33046 0039d316-1c4b-4281-b951-d872f2087c98
* Assorted cleanup.estade@chromium.org2009-11-231-1/+1
| | | | | | | | process: grep for TODO(port), find cruft, clean it up Review URL: http://codereview.chromium.org/427004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32844 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug when accessing g_browser_process->broker_services() at shutdown.jam@chromium.org2009-11-231-1/+2
| | | | | | | BUG=28501 Review URL: http://codereview.chromium.org/435001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32832 0039d316-1c4b-4281-b951-d872f2087c98
* Enable WebSocketExperiment backukai@chromium.org2009-11-191-4/+0
| | | | | | | | | | | r32311 fixes the cause of the crash, so enable WebSocket experiment again. BUG=28096,27856 TEST=none Review URL: http://codereview.chromium.org/399065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32462 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the memory purger to all the relevant locations.pkasting@chromium.org2009-11-181-3/+0
| | | | | | | | | | This removes the two-state purge/reset code (no longer necessary), and the hooks to the power monitor (not ready to turn those on without more work and testing). BUG=23400 TEST=Run Chrome with --purge-memory-button, use it for awhile, open the Task Manager, and click "Purge Memory". You should still be able to use the program normally, and hopefully we dumped some memory out too (varies by usage). Review URL: http://codereview.chromium.org/399028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32376 0039d316-1c4b-4281-b951-d872f2087c98
* Stop top-crasher regression by disabling WebSocketExperimentRunnerjar@chromium.org2009-11-181-0/+4
| | | | | | | | | | | | | | There was a race to destroy histograms held by an instance within WebSocketExperimentRunner, and this was causing the crash when histograms were being recorded at shutdown. See bug 28096 for re-enabling this feature. BUG=27856 r=wtc,ukai Review URL: http://codereview.chromium.org/404017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32263 0039d316-1c4b-4281-b951-d872f2087c98
* Use GetSwitchValuePath.evan@chromium.org2009-11-161-2/+2
| | | | | | | | | | BUG=24672 TEST=unit_tests Patch by Thiago Farina <thiago.farina@gmail.com>. Review URL: http://codereview.chromium.org/375016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32093 0039d316-1c4b-4281-b951-d872f2087c98
* Use Chrome to transport Chrome OS metrics. rvargas@google.com2009-11-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Chrome periodically reads the content of a well-know file, and parses it into name-value pairs, each representing a Chrome OS metrics event. The events are then logged using the normal UMA mechanism. The file is then truncated to zero size. Chrome uses flock() to synchronize accesses to the file. BUG=none TEST=compiled and run Linux and Chrome OS versions. Verified that uploaded Chrome OS events appear in about:histograms. Also external_metrics_unittest.cc tests the collection of metrics messages from the well-known file. patch written by semenzato_google.com original code review: http://codereview.chromium.org/378013 (plus http://codereview.chromium.org/346041) Review URL: http://codereview.chromium.org/394010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31952 0039d316-1c4b-4281-b951-d872f2087c98
* Write a test for loading libcros.so on startup of Chrome. You just pass thebrettw@chromium.org2009-11-131-2/+11
| | | | | | | | | | | | | | | --test-load-libcros on the command line. The browser will exit immediately and the error code (and error messages) will indicate success or failure. I also renamed loaded() static functions related to loading this library. These are not simple getters since they will actually load the library if its not loaded yet. I renamed it to EnsureLoaded. TEST=This is a test BUG=none Review URL: http://codereview.chromium.org/387014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31911 0039d316-1c4b-4281-b951-d872f2087c98
* WebSocket Live Experimentukai@chromium.org2009-11-111-0/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/369002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31653 0039d316-1c4b-4281-b951-d872f2087c98
* Fix first run ui hanging. The threads need to get started earlier.jam@chromium.org2009-11-051-6/+7
| | | | | | | BUG=26614 Review URL: http://codereview.chromium.org/360035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31046 0039d316-1c4b-4281-b951-d872f2087c98
* Remove themes/default.dll and merge the resources into chrome.dll.tc@google.com2009-11-021-2/+0
| | | | | | | | | | | This gives us one less file to load on startup. This does mean that some tests need to explicitly include theme_resources.rc. BUG=24035 Review URL: http://codereview.chromium.org/348033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30755 0039d316-1c4b-4281-b951-d872f2087c98
* Third patch in getting rid of caching MessageLoop pointers and always using ↵jam@chromium.org2009-11-021-2/+1
| | | | | | | | | | 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
* Use FilePath in UserDataDirDialog to remove the use of ↵avi@chromium.org2009-10-301-2/+1
| | | | | | | | | | | | | | FilePath::FromWStringHack. Patch by tfarina. BUG=None TEST=None Review URL: http://codereview.chromium.org/334017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30584 0039d316-1c4b-4281-b951-d872f2087c98
* Move chromeos code to namespace chromeos.chocobo@google.com2009-10-301-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/341044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30541 0039d316-1c4b-4281-b951-d872f2087c98
* Design changes in browser/privacy_blacklist needed to integratephajdan.jr@chromium.org2009-10-291-15/+0
| | | | | | | | | | | | | | | | | | privacy blacklists with extensions. - change I/O routines interface to be more clear - distinguish between transient and permanent blacklists - remove obsolete code (pbl_tool and blacklist error dialog) BlacklistManager will be responsible for recompiling the persistent blacklists. Errors will be reported via infobars. TEST=Covered by unit_tests. BUG=21541 Review URL: http://codereview.chromium.org/337025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30449 0039d316-1c4b-4281-b951-d872f2087c98
* Move a Linux only #include into the right place.thestig@chromium.org2009-10-281-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/341026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30402 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup a few FirstRun methods that are only applicable to Windows.kuchhal@chromium.org2009-10-281-1/+7
| | | | | | | | | BUG=11971 TEST=No functional change. Make sure first-run/import still works on all three platforms. Review URL: http://codereview.chromium.org/340020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30379 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the crashes in interactive_ui_tests on Linux.jam@chromium.org2009-10-281-4/+6
| | | | | | | | | | The cause is really subtle. When I added a db_thread() in BrowserMain, that changed the order that threads were created at. Since interactive ui tests don't run atexitmanager (I filed a bug to make them do), this cascaded into file_posix.cc's InFlightIO singelton caching the first IO MessageLoop pointer. By fluke, previously each IO ML would have the exact same pointer value (must be a unique size for the allocator). My change modified the construction order, so the second run would have a different ChromeThread (file) get the previous IO thread's ML pointer. That led to the asserts. I have added code to start the threads in a predictable manner for now. BUG=25354 TEST=interactive_ui_tests in Linux stop crashing Review URL: http://codereview.chromium.org/340017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30303 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify threading in browser thread by making only ChromeThread deal with ↵jam@chromium.org2009-10-271-7/+10
| | | | | | | | different thread lifetimes.The rest of the code doesn't get MessageLoop pointers since they're not thread-safe and instead just call PostTask on ChromeThread. If the target thread is not alive, then the task is simply deleted.In a followup change, I'll remove any remaining MessageLoop* caching. With this change, there's little to be gained by caching since no locks are involved if the target MessageLoop is guaranteed to outlive the current thread (inferred automatically by the order of the chrome_threads_ array).BUG=25354 Review URL: http://codereview.chromium.org/306032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30163 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the initialization of enabling the reporting metrics to initialize ↵gwilson@google.com2009-10-221-3/+2
| | | | | | | | | | | | from registry settings first, rather than defaulting to Local State. R=cpu,kuchhal TEST=Turn on usagestats in options, close chrome, set usagestats off in registry, restart and verify it is turned OFF in options. BUG=7547 Review URL: http://codereview.chromium.org/295035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29773 0039d316-1c4b-4281-b951-d872f2087c98
* Make importer obey import_search_engine preference even if FRUI is enabled.kuchhal@chromium.org2009-10-191-2/+6
| | | | | | | | | | | | With this change importer will give preference to the value specified in master preference for import_search_engine instead of ignoring it like before. BUG=23649 TEST=Specified in above bug. Review URL: http://codereview.chromium.org/274081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29426 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate all uses of strerror() in code that uses src/base. strerror() is ↵tschmelcher@chromium.org2009-10-131-2/+2
| | | | | | | | | | | inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror(). TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers BUG=none Review URL: http://codereview.chromium.org/261055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
* SIGTERM should cause the application to exit on the Mac.mark@chromium.org2009-10-121-6/+29
| | | | | | | | BUG=23551 TEST=Send SIGTERM to the browser process. It should exit cleanly. Review URL: http://codereview.chromium.org/269048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28695 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a SIGTERM handler for OS_POSIX builds. This is needed so that Chrome ↵cmasone@google.com2009-10-071-0/+25
| | | | | | | | | | | | | can shut down gracefully when many posix-based system halt or reboot while Chrome is open. SIGTERM may come in on any thread, so the handler creates a Task object that wraps up a call to BrowserList::CloseAllBrowsers(true) and Posts it to the message loop of the UI thread. Thus, we both get out of the signal handler quickly and can deal with the signal on any thread. BUG=23551 TEST=covered by BrowserTest.PosixSessionEnd Review URL: http://codereview.chromium.org/255036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28225 0039d316-1c4b-4281-b951-d872f2087c98
* Add framework of MemoryPurger, a class to dump memory from everywhere ↵pkasting@chromium.org2009-10-011-0/+3
| | | | | | | | | | | | possible. Currently does nothing. This also adds a "Purge memory" button to the task manager when run with --purge-memory-button, which can be used to test the functionality. BUG=23400 TEST=Run with --purge-memory-button, open the task manager and see a new button. Click it to toggle it to "Reset purge", and click again to toggle back. Review URL: http://codereview.chromium.org/259003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27751 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding:mbelshe@google.com2009-09-301-0/+4
| | | | | | | | | | | | | | | Implement a readsize throttle within the TCP socket. Add a fieldgroup trial for testing it. BUG=none TEST=none Original Review URL: http://codereview.chromium.org/173259 Review URL: http://codereview.chromium.org/243038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27595 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: remove --google-internal-crash-reporting.agl@chromium.org2009-09-281-5/+3
| | | | | | | | | It's time to kill this. It's been marginally useful, but only marginally. http://codereview.chromium.org/222021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27375 0039d316-1c4b-4281-b951-d872f2087c98
* Refuse to start if we can't get the user data directory.evan@chromium.org2009-09-251-7/+19
| | | | | | | | | | | The alternative is spewing private user data in random directories. BUG=22277 TEST=chmod -x ~/.config; Chrome should refuse to start Review URL: http://codereview.chromium.org/219043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27252 0039d316-1c4b-4281-b951-d872f2087c98
* linux: drop temp_scaffolding_stubsevan@chromium.org2009-09-251-3/+9
| | | | | | | | | 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