summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
Commit message (Collapse)AuthorAgeFilesLines
* Open up SDCH for all sites, in preparation for latency testsjar@google.com2008-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Since the stability test is going well (so far) on ".google.com," this change will open up support for SDCH compression to all sites. This will allow for more international testing as well. I tightened down the restrictions on who can set up a dictionary for a given domain. I'm pretty sure it is at least as restrictive as the current SDCH spec. I also supplied a default expiration time for using an SDCH dictionary at 30 days (as per SDCH spec). To be safer with the latency histograms, I also tightened the period of time we measure, on the off chance that the page some-how asks for more bytes after everything has been read/rendered. r=openvcdiff,hunar Review URL: http://codereview.chromium.org/11009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5529 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to avoid first-run pop-up from displaying while in app-mode.brg@chromium.com2008-11-141-0/+5
| | | | | | Review URL: http://codereview.chromium.org/10675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5511 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/10958mbelshe@google.com2008-11-141-4/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5509 0039d316-1c4b-4281-b951-d872f2087c98
* Change to integrate SystemMonitor changes into chrome.mbelshe@google.com2008-11-141-0/+4
| | | | | | | | | | | | This enables the dynamic detection of battery status changes so that we can turn on/off the hi-res timer. Review URL: http://codereview.chromium.org/10264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5489 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-2/+2
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Re-do the way browser windows are shown:ben@chromium.org2008-11-141-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the path from WinMain to the Browser object passing the show_command. For the Browser object, this is a problem since this value isn't portable. For the code in general it involves a lot of ugly wiring. It's completely unnecessary since the value is obtainable via GetStartupInfo. - Remove show_command plumbing from all over the place (session restore, web app launcher, etc) Change the way browser windows are constructed: - The browser constructor now takes just a type and a profile, and simply initializes the object. - Some configuration that used to be part of the constructor that was only used in one or two use cases (initial bounds, maximized state, web app name) are split into separate setters. - Window creation is split out into a separate step to be called post configuration. - Assorted static helper functions added to Browser to make construction of common types easy. - Remove Browser::Show in favor of BrowserWindow::Show - Adjust all callers to use the new helpers. Change the way ChromeViews restores window placement: - Split restored size determination from restored maximized determination. They are needed by the code at different times. Size restoration happens when the window is constructed and Window::SetInitialBounds is called. Maximized state restoration happens when the window is shown for the first time and SW_SHOWMAXIMIZED or SW_SHOWNORMAL is needed. Thus, replace WindowDelegate::RestoreWindowPosition with WindowDelegate::RestoreWindowBounds and WindowDelegate::RestoreMaximizedState. - Window::SetInitialBounds calls WindowDelegate::RestoreWindowBounds - Window::Show calls WindowDelegate::RestoreMaximizedState - Adjusts all WindowDelegate implementations that override RestoreWindowPosition to implement these new methods instead. - Move "playback/record" mode window size setting from browser_init to Browser::RestoreWindowBounds. - Provide a virtual function on Window called GetShowState that determines the default show state to be used when Window::Show is called. For most windows and dialogs this is SW_SHOWNORMAL. AeroGlassFrame/OpaqueFrame (the browser window frames) override this since they're the app's main windows to return the value provided by GetStartupInfo which gives the value from the app shortcut. http://crbug.com/3557 Review URL: http://codereview.chromium.org/10896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5417 0039d316-1c4b-4281-b951-d872f2087c98
* * Try to rename chrome exes in shutdown path as well.kuchhal@chromium.org2008-11-121-12/+1
| | | | | | | | 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
* * Create unique event in global namespacekuchhal@chromium.org2008-11-081-9/+3
| | | | | | | | so that we can detect Chrome instances across user sessions. Review URL: http://codereview.chromium.org/10234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5057 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the new mechanism we are going to use for handling Chromium updateskuchhal@chromium.org2008-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | while it is in use. This should work for per user as well as system level installs (after some additional changes once Google Update changes are ready). The following scenarios should work now: - If Chromium is using two different profiles at the same time we do not switch chrome executables until all of them are closed. - The old version of Chromium can be run after a restart if the renaming of executables fails. - We will not use environment variable any more but we need to keep it until all the users get this change on their machines. - opv/rename registry keys and new_chrome.exe should always together. If one exist all three should exist because they are created and deleted as one atomic operation (as much as possible given laws of physics). BUG=1463346 Review URL: http://codereview.chromium.org/9436 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4949 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring master preference parsing code into installer util sohuanr@chromium.org2008-11-041-4/+2
| | | | | | | | | it can be shared by first run and set up. There is no functionality change in this CL. Review URL: http://codereview.chromium.org/9338 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4688 0039d316-1c4b-4281-b951-d872f2087c98
* On first run process the master prefs json, only one entry matters to us.cpu@google.com2008-10-311-1/+1
| | | | | | | | | | | - skip or not first run dialgos - on skip import silently search provider only BUG=1394863 Review URL: http://codereview.chromium.org/8758 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4346 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup of DNS prefetch related filesjar@google.com2008-10-271-1/+1
| | | | | | | | | | | I have a separate change list coming to support predictive DNS resolutions, so I pulled out a pile of mechanical changes (with no semantic changes intendend). r=mbelshe Review URL: http://codereview.chromium.org/8624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4015 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on SDCH support for google.com by default.jar@google.com2008-10-241-4/+6
| | | | | | | | | | | | | | | I'll just turn it on for google.com to start with, since I think google is the only server supporting this experimental protocol. This doesn't catch all the google usages, as search in Europe/Asia etc. may use a different server, but this should get some baseline tip-o-tree usage. After a week or two (without problems), I'll open it up by default for all sites on the net. r=openvcdiff Review URL: http://codereview.chromium.org/8154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3940 0039d316-1c4b-4281-b951-d872f2087c98
* Add installer command line option to create shortcuts (desktop and quickkuchhal@chromium.org2008-10-241-2/+4
| | | | | | launch). git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3913 0039d316-1c4b-4281-b951-d872f2087c98
* Change the default http stack for chrome.exe from winhttp to the new one.ericroman@google.com2008-10-221-3/+2
| | | | | | | | http://code.google.com/p/chromium/issues/detail?id=2645 Review URL: http://codereview.chromium.org/7876 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3776 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies.evanm@google.com2008-10-221-0/+1
| | | | | | | | | Random files in V8Bindings were getting rebuilt when I touched process_util.h. I tracked it down to stats_table.h and shared_memory.h. This change cuts down some dependencies there; more could be removed if we made some of our FooHandle typedefs into abstract data types instead. Review URL: http://codereview.chromium.org/7307 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3770 0039d316-1c4b-4281-b951-d872f2087c98
* Rollback r3693 as it caused a 7% startup test slowdown.ericroman@google.com2008-10-221-2/+3
| | | | | | | | BUG=3639 Review URL: http://codereview.chromium.org/8044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3711 0039d316-1c4b-4281-b951-d872f2087c98
* Change the default http stack for chrome.exe from winhttp to the new one.ericroman@google.com2008-10-211-3/+2
| | | | | | | | http://code.google.com/p/chromium/issues/detail?id=2645 Review URL: http://codereview.chromium.org/7668 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3693 0039d316-1c4b-4281-b951-d872f2087c98
* Construct a field trial to see if HIGH or MEDIUM memory model "works better"jar@google.com2008-10-191-8/+11
| | | | | | | | | | | | | | Includes definition of a FieldTrial class to support this. I have thoughts in my head about how this will eventually extend to be controllable via UMA (as well as being able to run tests defined at compile time, as was done in this example. r=mbelshe, mmentovai Review URL: http://codereview.chromium.org/7638 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3604 0039d316-1c4b-4281-b951-d872f2087c98
* Add processing for a master profile json file on first run. Allows:cpu@google.com2008-10-171-3/+10
| | | | | | | | | - set home page / show home button - show bookmarks bar Review URL: http://codereview.chromium.org/7369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3542 0039d316-1c4b-4281-b951-d872f2087c98
* This is the same change as 2419 minus a line of debug code I accidentally ↵petersont@google.com2008-10-161-4/+17
| | | | | | | | left in browser_main.cc which ignored the user preference. Review URL: http://codereview.chromium.org/4229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3448 0039d316-1c4b-4281-b951-d872f2087c98
* Add a check in Chrome to not run user level mode if machine level Chromekuchhal@chromium.org2008-10-151-0/+46
| | | | | | is already installed. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3423 0039d316-1c4b-4281-b951-d872f2087c98
* Add a lot of robustness to SDCH filter decodingjar@google.com2008-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | a) Do meta-refresh (and partially disable sdch) when we have an sdch decode error early on (due to lack of dictionary). b) Gracefully handle proxy removal of "gzip" in "content-encoding: sdch,gzip". c) Recover from completely stripped content encoding (in response to a request for which we advertised an SDCH dictionary) by using a filter that can optionally decode sdch with an optional gzip as well. Some field tests have shown problems with this protocol's transit across the ether. The general approach we've adopted is to stop using SDCH on the problematic site when we have problems. This will prevent a malicious site from shutting down all use of SDCH. r=kmixter,openvcdiff,huanr Review URL: http://codereview.chromium.org/6433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3420 0039d316-1c4b-4281-b951-d872f2087c98
* Reuse a method that will be required for criteria checker as well.kuchhal@chromium.org2008-10-081-8/+3
| | | | | | Review URL: http://codereview.chromium.org/6587 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3056 0039d316-1c4b-4281-b951-d872f2087c98
* Use the new HTTP stack by default in the net module'swtc@google.com2008-10-081-0/+3
| | | | | | | | | | | | | | | | tests, but continue to use WinHTTP by default in the test shell and chrome. The mapping of CRYPT_E_NO_REVOCATION_CHECK to ERR_CERT_NO_REVOCATION_MECHANISM (a certificate error code) is necessary to make the HTTPSTestServer's start and shutdown GET commands work. (The TestDelegate ignores all certificate errors.) R=darin Review URL: http://codereview.chromium.org/6472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3022 0039d316-1c4b-4281-b951-d872f2087c98
* Move all callers to EnsureWinsockInit, and away from using WinsockInit ↵deanm@chromium.org2008-10-061-1/+1
| | | | | | | | instances. Review URL: http://codereview.chromium.org/6486 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2874 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring for portability:mark@chromium.org2008-09-291-1/+0
| | | | | | | | | | | | | - Move chrome/common/env_util to base/sys_info - Move chrome/common/rand_util to base/rand_util (new), simplify its public interface, and fix its implementation Patch by Paweł Hajdan, Jr. <phajdan.jr@gmail.com> http://codereview.chromium.org/4079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2697 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land SDCH filter support experimentjar@google.com2008-09-231-0/+11
| | | | | | | | | | | Fix up solution files for webkit and net Add one line keyword change to help linux build r=hunanr,openvcdiff,nsylvain Review URL: http://codereview.chromium.org/4026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2469 0039d316-1c4b-4281-b951-d872f2087c98
* Rollback 2444 and 2443 to get linux and mac prepjar@google.com2008-09-221-11/+0
| | | | | | | | | Also need to augment sln dependencies tbr Review URL: http://codereview.chromium.org/3188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2446 0039d316-1c4b-4281-b951-d872f2087c98
* Experimental integration of delta compression content encodingjar@google.com2008-09-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | The command line option "sdch-enable" enables support of sdch and automtic lazy download of dictionaries. Optionally it can select a singular domain to work from. By default, all domains are enabled when the flag is used. "-sdch-enable=".google.com" Enables it only for Google. When the switch is not set on the command line, all this code is completely disabled. Still TBD: a) Finish implementation of security details (much of it is in place) b) Add tests for security details. r=huanr,ajenjo,kmixter Review URL: http://codereview.chromium.org/461 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2443 0039d316-1c4b-4281-b951-d872f2087c98
* Revert change 2419 because it breaks the buildnsylvain@chromium.org2008-09-201-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The stack crashing is this one: chrome_2650000!xmlTextWriterStartElement+0x23 chrome_2650000!MetricsLog::StartElement+0xb5 chrome_2650000!MetricsLog::ScopedElement::ScopedElement+0x67 chrome_2650000!MetricsLog::RecordHistogramDelta+0xd8 chrome_2650000!MetricsService::RecordHistogram+0x122 chrome_2650000!MetricsService::RecordCurrentHistograms+0xc3 chrome_2650000!MetricsService::StopRecording+0x94 chrome_2650000!MetricsService::PushPendingLogsToUnsentLists+0xbf chrome_2650000!MetricsService::SetRecording+0x36f chrome_2650000!MetricsService::Stop+0x11 chrome_2650000!BrowserMain+0xefa chrome_2650000!ChromeMain+0x862 It looks like writer_ is null on invalid. It also look like there is debugging code that was left in. Review URL: http://codereview.chromium.org/4005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2433 0039d316-1c4b-4281-b951-d872f2087c98
* This is the same change as issue 1633 ( http://codereview.chromium.org/1633 ↵petersont@google.com2008-09-191-3/+9
| | | | | | | | ) together with the disabling of a test called MetricsServiceTest.CloseRenderersNormally which the change makes obsolete (see bug 2522.) Review URL: http://codereview.chromium.org/2995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2419 0039d316-1c4b-4281-b951-d872f2087c98
* Make the GoogleURLTracker only fetch the Google hostname if the user's ↵pkasting@chromium.org2008-09-151-0/+15
| | | | | | | | | | | default search engine is Google. Our existing restrictions still apply: no fetches before five seconds after startup, and no more than one fetch per run. Because of lazy initialization everywhere, this was hairier than I'd hoped. We have to ensure we don't try to fetch until the profile has been created, lest GetDefaultRequestContext() return NULL. Note that this was actually a bug in the existing product: if you set your startup page to, say, about:blank, and started the browser and did nothing at all for five seconds, we'd crash. BUG=1291 Review URL: http://codereview.chromium.org/1942 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2223 0039d316-1c4b-4281-b951-d872f2087c98
* Move more UI stuff into browser/viewsbeng@google.com2008-09-131-1/+1
| | | | | | | B=2205 Review URL: http://codereview.chromium.org/2825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2169 0039d316-1c4b-4281-b951-d872f2087c98
* Back r2151 since it causes ui tests failures.maruel@google.com2008-09-131-7/+3
| | | | | | Review URL: http://codereview.chromium.org/3037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2161 0039d316-1c4b-4281-b951-d872f2087c98
* Added routines to MetricsService to parse the server response and respond to ↵petersont@google.com2008-09-131-3/+7
| | | | | | | | the request to cease uploading with some probability. Review URL: http://codereview.chromium.org/1633 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2151 0039d316-1c4b-4281-b951-d872f2087c98
* c_str was getting called on the return value of a function. The return ↵petersont@google.com2008-09-031-1/+3
| | | | | | | | | value would get destroyed when out of scope invalidating the pointer. Quick fix: copy the return value of the function into a local std::string, and call c_str on that. R=nsylvain git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1664 0039d316-1c4b-4281-b951-d872f2087c98
* Some more changes so that Chromium and Google Chrome do not clash with each ↵rahulk@google.com2008-08-311-3/+4
| | | | | | | | | other while running at the same time. BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1600 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Google Chrome specific strings from common resources file and use ↵rahulk@google.com2008-08-271-0/+1
| | | | | | | | | them from new resources file that is specific to only Google Chrome. BUG=1110882 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1473 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome changes corresponding to my message_loop_type CL.darin@google.com2008-08-261-2/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1363 0039d316-1c4b-4281-b951-d872f2087c98
* Make PlatformThread::SetName operate only on the current thread.deanm@google.com2008-08-251-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1306 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
* Port the Thread class properly to Mac and Linux. This involved portingdarin@google.com2008-08-211-1/+1
| | | | | | | | | | | | PlatformThread and creating an API on PlatformThread to create a native thread and later join with it. I also made a few other tweaks to PlatformThread, such as eliminating the Current() method which appears to be unused. The operator==() is also unused, so I killed it as well. I made a few other miscellaneous cleanups and adjustments. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1146 0039d316-1c4b-4281-b951-d872f2087c98
* Large patch set (159 files total) to cleanup the includes.maruel@google.com2008-08-151-0/+1
| | | | | | | | | | - Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce MessagePump to represent the native message pump used to drive adarin@google.com2008-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageLoop. A MessageLoop now has a MessagePump. This will make it possible to port the MessagePump interface to other platforms as well as to use an IO completion port for our worker threads on Windows. Currently, there is only MessagePumpWin, which attempts to preserve the pre-existing behavior of the MessageLoop. API changes to MessageLoop: 1. MessageLoop::Quit means return from Run when the MessageLoop would otherwise wait for more work. 2. MessageLoop::Quit can no longer be called outside the context of an active Run call. So, things like this: MessageLoop::current()->Quit(); MessageLoop::current()->Run(); are now: MessageLoop::current()->RunAllPending(); 3. MessageLoop::Quit can no longer be called from other threads. This means that PostTask(..., new MessageLoop::QuitTask()) must be used explicitly to Quit across thread boundaries. 4. No protection is made to deal with nested MessageLoops involving watched objects or APCs. In fact, an assertion is added to flag such cases. This is a temporary measure until object watching and APC facilities are removed in favor of a MessagePump designed around an IO completion port. As part of this CL, I also changed the automation system to use an IPC::ChannelProxy instead of an IPC::Channel. This moves the automation IPC onto Chrome's IO thread where it belongs. I also fixed some abuses of RefCounted in the AutomationProvider class. It was deleting itself in some cases! This led to having to fix the ownership model for AutomationProvider, which explains the changes to AutomationProviderList and so on. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@928 0039d316-1c4b-4281-b951-d872f2087c98
* Moving GoogleUpdateSettings to util. Installer as well as Chrome needs these ↵rahulk@google.com2008-08-141-1/+1
| | | | | | | | | settings. BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@877 0039d316-1c4b-4281-b951-d872f2087c98
* Add a couple of metrics to help us quantify two cases that can prevent us to ↵cpu@google.com2008-08-131-0/+12
| | | | | | | | | get crash reports. - Added env_vars to exe project instead of keep duplicating the strings. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@766 0039d316-1c4b-4281-b951-d872f2087c98
* Patch uninstall until we fix bug 1308130.rahulk@google.com2008-08-071-11/+18
| | | | | | BUG=1311781 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@516 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply revision 380 since it wasn't the cause of the build breakage.maruel@google.com2008-08-051-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@394 0039d316-1c4b-4281-b951-d872f2087c98
* Revert revision 380 to see if it fixes the build. Please reapply once the ↵nsylvain@google.com2008-08-051-3/+3
| | | | | | tree is green. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@390 0039d316-1c4b-4281-b951-d872f2087c98