summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_service_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Convert use of int ms to TimeDelta in files owned by jar.tedvessenes@gmail.com2012-01-281-26/+27
| | | | | | | | | | | R=jar@chromium.org BUG=108171 TEST= Review URL: http://codereview.chromium.org/9190027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119547 0039d316-1c4b-4281-b951-d872f2087c98
* Decrease the PAC polling delay even further.eroman@chromium.org2012-01-201-37/+27
| | | | | | | | | | Reduces the poll interval for success to 12 hours, and for failures to a maximum of 4 hours. BUG=110551 Review URL: https://chromiumcodereview.appspot.com/9255033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118551 0039d316-1c4b-4281-b951-d872f2087c98
* Change the polling policy for PAC scripts to be much less frequent (new: 2 ↵eroman@chromium.org2012-01-181-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | hours, old: 2 minutes). The poll intervals are now as follows: In response to a failure fetching the PAC script: 8 seconds 32 seconds 2 minutes 2 hours 2 hours ... (2 hours) In response to a success fetching the PAC script: 2 minutes 2 hours 2 hours ... (2 hours) BUG=110551 Review URL: http://codereview.chromium.org/9255023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118180 0039d316-1c4b-4281-b951-d872f2087c98
* Don't poll the PAC script during periods of network inactivity.eroman@chromium.org2012-01-131-11/+223
| | | | | | | | | BUG=109310 Review URL: http://codereview.chromium.org/9139070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117709 0039d316-1c4b-4281-b951-d872f2087c98
* Poll PAC scripts for content changes.eroman@chromium.org2012-01-051-32/+487
| | | | | | | | | | | | | | | | | | An exponential poll delay is used which doubles the delay after each attempt (for instance polls might occur at 4 seconds, then 8 seconds, then 16 seconds, up to a maximum of 2 minutes). This same mechanism also applies to the resolution of "auto-detect" settings. The intent of this change is to make it possible to (1) Notice server-side changes made to the PAC scripts (2) Recover from spurious network errors when initially downloading PAC scripts. BUG=90581 TEST=Configure Chrome to use a PAC script which fails to load (i.e. a non-existent file:// url, or remap the host's DNS record). Start Chrome and verify using about:net-internals that it has failed to fetch the PAC script and has fallen back to DIRECT settings. Fix the PAC URL to work and wait for chrome to notice the change and reconfigure itself (will take a maximum of 2 minutes). Review URL: http://codereview.chromium.org/9078003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116462 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert net/proxy.jhawkins@chromium.org2011-12-201-144/+166
| | | | | | | | | | BUG=none TEST=none R=csilv Review URL: http://codereview.chromium.org/8985012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115068 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert proxy_resolving_client_socket.[cc,h] and deps.jhawkins@chromium.org2011-12-151-42/+43
| | | | | | | | | | BUG=none TEST=none R=csilv Review URL: http://codereview.chromium.org/8898036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114562 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: Extract "InitProxyResolver" to "ProxyScriptDecider".eroman@chromium.org2011-12-131-30/+25
| | | | | | | | | | | | | This is primarily a rename, with the exception that the initialization of ProxyResolver (i.e. the javascript runtime environment for the PAC script) is no longer done inside of ProxyScriptDecider. The motivation for doing this is to make it possible to poll our automatic proxy settings (PAC URLs or WPAD) in the background, _without_ needing to feed the scripts into the javascript parser for validation. There likely won't be any user-visible consequence of this change, however the new mechanism is weaker than the original -- it is possible for the PAC selection to now choose a PAC script which fails to parse as javascript, even though there was a later fallback choice which does parse. This should be rare though (the bad response would need to contain the substring "FindProxyForURL"). BUG=TODO (bugtracker down right now) Review URL: http://codereview.chromium.org/8896019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114281 0039d316-1c4b-4281-b951-d872f2087c98
* Begin CompletionCallback switchover.willchan@chromium.org2011-10-011-76/+76
| | | | | | | | | | | | | Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
* Only mark a proxy as bad if we have confirmation that another proxy ↵asanka@chromium.org2011-08-291-0/+22
| | | | | | | | | | | | succeeded for the same request. BUG=87336 TEST=net_unittests --gtest_filter=ProxyServiceTest.ProxyFallback:HttpStreamFactoryTest.JobNotifiesProxy Review URL: http://codereview.chromium.org/7532011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98643 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE throughout net/proxy/*eroman@chromium.org2011-07-221-3/+4
| | | | | | | | In the process I discovered 2 dummy virtual overrides of NetworkDelegate interface. (Interface it was trying to overwrite no longer exists). Review URL: http://codereview.chromium.org/7484010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93664 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol.joi@chromium.org2011-05-171-58/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is Windows-only for now, and is disabled by default. Start Chrome with the flag --enable-dhcp-wpad to enable the feature. See discussion in comment on DhcpProxyScriptFetcherFactory for why this needs to be done in a per-platform way rather than cross-platform. The code is factored so that adding other platform implementations will be straight forward. Most of the implementation is stand-alone and extends the ScriptProxyFetcher class hierarchy (and makes its interface slightly more generic). The integration point into existing code is in InitProxyResolver, which previously handled fallback from DNS auto-detect to custom PAC URL and now does fallback from DHCP to DNS to custom PAC URL. BUG=18575 TEST=net_unittests has good coverage for the new and changed code, but manual tests on a network with a PAC URL configured in DHCP are also needed. Original commit r85646. Reverted (test failures on some release bots) r85648. Will reland with fix. Review URL: http://codereview.chromium.org/6831025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85661 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85646 - Adds support for the DHCP portion of the WPAD (proxy ↵joi@chromium.org2011-05-171-24/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | auto-discovery) protocol. This is Windows-only for now, and is disabled by default. Start Chrome with the flag --enable-dhcp-wpad to enable the feature. See discussion in comment on DhcpProxyScriptFetcherFactory for why this needs to be done in a per-platform way rather than cross-platform. The code is factored so that adding other platform implementations will be straight forward. Most of the implementation is stand-alone and extends the ScriptProxyFetcher class hierarchy (and makes its interface slightly more generic). The integration point into existing code is in InitProxyResolver, which previously handled fallback from DNS auto-detect to custom PAC URL and now does fallback from DHCP to DNS to custom PAC URL. BUG=18575 TEST=net_unittests has good coverage for the new and changed code, but manual tests on a network with a PAC URL configured in DHCP are also needed. Review URL: http://codereview.chromium.org/6831025 TBR=joi@chromium.org Review URL: http://codereview.chromium.org/7019015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85648 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol.joi@chromium.org2011-05-171-58/+24
| | | | | | | | | | | | | | | | | | | | | | | | | This is Windows-only for now, and is disabled by default. Start Chrome with the flag --enable-dhcp-wpad to enable the feature. See discussion in comment on DhcpProxyScriptFetcherFactory for why this needs to be done in a per-platform way rather than cross-platform. The code is factored so that adding other platform implementations will be straight forward. Most of the implementation is stand-alone and extends the ScriptProxyFetcher class hierarchy (and makes its interface slightly more generic). The integration point into existing code is in InitProxyResolver, which previously handled fallback from DNS auto-detect to custom PAC URL and now does fallback from DHCP to DNS to custom PAC URL. BUG=18575 TEST=net_unittests has good coverage for the new and changed code, but manual tests on a network with a PAC URL configured in DHCP are also needed. Review URL: http://codereview.chromium.org/6831025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85646 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented unit tests for ProxyService and fixed a bugbattre@chromium.org2011-05-061-0/+237
| | | | | | | | | BUG=81368 TEST=execute net_unittests --gtest_filter='ProxyServiceTest.*' Review URL: http://codereview.chromium.org/6932041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84422 0039d316-1c4b-4281-b951-d872f2087c98
* Stop refcounting ProxyService.willchan@chromium.org2011-04-271-178/+150
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6873096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83222 0039d316-1c4b-4281-b951-d872f2087c98
* Allow ProxyConfigService to report "no configuration set"mnissler@chromium.org2011-04-111-11/+11
| | | | | | | | | | | Introduce a ConfigAvailability enum such that ProxyConfigService is able to return configuration status at a finer granularity level. This allows to fall back to default values (potentially configured through policy) if the system service doesn't have configuration. BUG=none TEST=unit tests, recommended proxy policy works on CrOS. Review URL: http://codereview.chromium.org/6597070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81085 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove prefix net:: from some places that already are in namespace net.tfarina@chromium.org2011-01-191-5/+5
| | | | | | | | | | | This should address the wtc review in http://codereview.chromium.org/6338002/ BUG=64263 TEST=trybots Review URL: http://codereview.chromium.org/6322003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71787 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestContext URLRequestContext;tfarina@chromium.org2011-01-151-2/+2
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6338002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71522 0039d316-1c4b-4281-b951-d872f2087c98
* Almost done deinlining virtual methods.erg@google.com2010-12-161-0/+2
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5841002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69470 0039d316-1c4b-4281-b951-d872f2087c98
* Update NetLog to be threadsafe.mmenke@chromium.org2010-12-011-18/+30
| | | | | | | | | | | | | | | | | | The ChromeNetLog is now owned by the browser process, and passed to the IOThread on creation. NetLog entries can be added from any thread. Observers must be able to handle having log entries added from any thread. Observers can add/remove themselves on any thread. BUG=63334 TEST=None, yet Review URL: http://codereview.chromium.org/4118004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67851 0039d316-1c4b-4281-b951-d872f2087c98
* Change the logging of PROXY_CONFIG_CHANGED so it is not displayed each time ↵eroman@chromium.org2010-09-241-1/+13
| | | | | | | | | the IP address changes. BUG=53387 Review URL: http://codereview.chromium.org/3404017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60393 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce an artificial 2 second delay after network IP address changes ↵eroman@chromium.org2010-08-261-0/+4
| | | | | | | | | | | | | | | before re-running proxy auto-config. During this time network requests will be stalled. This is to work around a problem where DNS gives transient failures shortly after IP address changes. BUG=50779 TEST=On a linux laptop switch between wireless networks while using auto-detect. When you switch to a network that contains the host 'wpad' verify that when InitProxyResolver runs it does not get a DNS error resolving 'wpad'. (Use about:net-internals to view this information). Review URL: http://codereview.chromium.org/3151040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57471 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include utf_string_conversions.h to all files that use ASCIIToWide andbrettw@chromium.org2010-08-031-0/+1
| | | | | | | | | | | | | | | ASCIIToUTF16. I removed string_util includes from a few places where it obviously wasn't needed. In a separate pass, I'm going to remove ASCIITo* from string_util, then I'm going to do an even later pass to find the unnecessary string_util.h includes and remove them. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3058027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54746 0039d316-1c4b-4281-b951-d872f2087c98
* Change the ProxyConfigService interface to be asynchronous, and support ↵eroman@chromium.org2010-07-231-80/+55
| | | | | | | | | | | | observers. The Windows implementation is still using a polling mechanism under the hood, however that polling has been moved to the worker pool so it won't block the IO thread in case WinHttpGetIEProxyConfigForCurrentUser is slow (crbug.com/12189). BUG=12189 Review URL: http://codereview.chromium.org/3056011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53442 0039d316-1c4b-4281-b951-d872f2087c98
* Reference-count the data used by PAC scripts, so it is shared between threads.eroman@chromium.org2010-07-201-24/+26
| | | | | | | BUG=49396 Review URL: http://codereview.chromium.org/2836060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53095 0039d316-1c4b-4281-b951-d872f2087c98
* Optimization: reduce the copying of string data between C++ and javascript ↵eroman@chromium.org2010-07-011-19/+24
| | | | | | | | | | | | | | | in proxy_resolver_v8.cc. This is done by sharing the string storage using ExternalStringResource. An accompanying change was to pass around the PAC script data as a UTF16 string16 rather than a UTF8 std::string -- this required changing plumbing in the other files. This optimization will be important when creating multiple ProxyResolverV8's so they don't end up duplicating the script text. BUG=11079 Review URL: http://codereview.chromium.org/2817043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51434 0039d316-1c4b-4281-b951-d872f2087c98
* Massively simplify the NetworkChangeNotifier infrastructure:pkasting@chromium.org2010-06-251-50/+36
| | | | | | | | | | | | | | * Use a process-wide object (singleton pattern) * Create/destroy this object on the main thread, make it outlive all consumers * Make observer-related functions threadsafe As a result, the notifier can now be used by any thread (eliminating things like NetworkChangeObserverProxy and NetworkChangeNotifierProxy, and expanding its usefulness); its creation and inner workings are much simplified (eliminating implementation-specific classes); and it is simpler to access (eliminating things like NetworkChangeNotifierThread and a LOT of passing pointers around). BUG=none TEST=Unittests; network changes still trigger notifications Review URL: http://codereview.chromium.org/2802015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50895 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove the implicit constructor for BoundNetLog that allowed ↵eroman@chromium.org2010-04-281-102/+126
| | | | | | | | | passing NULL in place of a const BoundNetLog&. BUG=37421 Review URL: http://codereview.chromium.org/1783008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45851 0039d316-1c4b-4281-b951-d872f2087c98
* Move over another legacy "LoadLog-style" event generator to routing its ↵eroman@chromium.org2010-03-161-33/+44
| | | | | | | | | | messages through the NetLog. BUG=37421 Review URL: http://codereview.chromium.org/1052002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41768 0039d316-1c4b-4281-b951-d872f2087c98
* Generalize the net module's LoadLog facility from a passive container, to an ↵eroman@chromium.org2010-03-161-26/+31
| | | | | | | | | | | | | | | | event stream (NetLog). This makes it possible to associate a single NetLog with a URLRequestContext, and then attach observers to that log to watch the stream of events. This changelist attempts to do the most direct translation, so there will be subsequent iterations to clean up. The user-visible behavior should remain unchanged. BUG=37421 Review URL: http://codereview.chromium.org/848006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41689 0039d316-1c4b-4281-b951-d872f2087c98
* ProxyConfig behaved like a struct, but was defined as a class.eroman@chromium.org2010-02-241-33/+33
| | | | | | | | | Changed it to be a proper class with hidden implementation variables, setters etc. Also seized this opportunity to move the bypass list from being a member of ProxyConfig, to being a member of ProxyRules. This is a more correct hiearchy, since the bypass rules only apply to the manual settings. Lastly, this makes it possible to have the manual rules evaluation be a method on ProxyRules, and shift some more code out of proxy_service. Review URL: http://codereview.chromium.org/651070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39818 0039d316-1c4b-4281-b951-d872f2087c98
* Split out the handling of proxy bypass rules into ProxyBypassRules. There ↵eroman@chromium.org2010-02-191-238/+18
| | | | | | | | | | | | | | are some pretty complicated rules, and this helps isolate that code and better test it. This also lays a framework for addressing bug 9835 (IP/CIDR matching) Lastly, adds support for the exclusion format ".domain" on all platforms, which is interpreted as "*.domain". BUG=28112 TEST=ProxyBypassRulesTest.* Review URL: http://codereview.chromium.org/601070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39486 0039d316-1c4b-4281-b951-d872f2087c98
* Add unittest for r37566 (on PAC failure, should fallback to DIRECT).eroman@chromium.org2010-02-051-5/+9
| | | | | | | | | | | | To make it more testable, I had to move the fallback code in question from HttpNetworkTransaction to ProxyService. Although I think this is a better fit for that code anway, so it should be an overall readability improvement. BUG=32316 TEST=ProxyServiceTest.ProxyFallback_BadConfig, ProxyServiceTest.ProxyResolverFails Review URL: http://codereview.chromium.org/556087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38177 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the NetworkChangeNotifier to HostResolver.willchan@chromium.org2010-02-041-4/+3
| | | | | | | | | | | | | | | This requires the following refactors: (1) NetworkChangeNotifier moves out of HttpNetworkSession into IOThread. (2) HostResolver gets initialized with NetworkChangeNotifier. (3) NetworkChangeNotifier needs to get passed into HttpCache and HttpNetworkSession (required updating a lot of files). (4) NetworkChangeNotifier is no longer reference counted. It is owned by IOThread. (5) IOThread gains a new struct: Globals. It can only be used on the io thread. (6) ChromeURLRequestContextFactory uses IOThread::Globals to initialize ChromeURLRequest objects with the host resolver and network change notifier. BUG=26159 Review URL: http://codereview.chromium.org/552117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38052 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup the unittest helpers in load_log_unittest.h.eroman@chromium.org2010-01-291-13/+14
| | | | | | | | | | | Consolidates all the callers to using the testing::AssertionResult() flavor, and renames them to have "Event" in the name. This rename is in anticipation of adding testers for other entry types. BUG=NONE TEST=existing Review URL: http://codereview.chromium.org/551135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37501 0039d316-1c4b-4281-b951-d872f2087c98
* Retry proxies which were cached as bad before giving up.eroman@chromium.org2010-01-121-3/+11
| | | | | | | | | | | This morphs ProxyList::RemoveBadProxies() into ProxyList::DeprioritizeBadProxies(), such that "bad proxies" are moved to the end of the fallback list rather than removed alltogether. BUG=31983 TEST=ProxyListTest.DeprioritizeBadProxies Review URL: http://codereview.chromium.org/542029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36054 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a NetworkChangeNotifier dependency to ProxyService; when we observer a ↵eroman@chromium.org2010-01-081-43/+144
| | | | | | | | | | | | | | | network change through the notifier, the ProxyService re-configures itself. So for example, if you were to switch to VPN and are using a custom PAC URL, we will re-download that URL on the new network. Similarly if you are using auto-detect PAC settings, we will re-run the autodiscovery steps for the next resolve. Note that Chromium is still passing a NULL NetworkChangeNotifier dependency into its ProxyService -- until it passes a real implementation, this will not impact Chrome. BUG=12293 TEST=ProxyServiceTest.NetworkChangeTriggersPacRefetch Review URL: http://codereview.chromium.org/525104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35772 0039d316-1c4b-4281-b951-d872f2087c98
* Log the results of proxy resolution to LoadLog when "full logging mode" is ↵eroman@chromium.org2010-01-071-4/+4
| | | | | | | | | | | | | | enabled. Examples of what the logged text looks like: "Resolved proxy list: PROXY foobar:6233" "Resolved proxy list: DIRECT" "Resolved proxy list: PROXY foobar:80;SOCKS5 baz:1080;DIRECT" Review URL: http://codereview.chromium.org/518042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35749 0039d316-1c4b-4281-b951-d872f2087c98
* Re-order some declarations in ProxyService, to ensure that deletion of ↵eroman@chromium.org2010-01-061-0/+64
| | | | | | | | | | | InitProxyResolver happens *after* the deletion of ProxyResolver. BUG=24864 TEST=ProxyServiceTest.DeleteWhileInitProxyResolverHasOutstandingFetch, ProxyServiceTest.DeleteWhileInitProxyResolverHasOutstandingSet Review URL: http://codereview.chromium.org/519060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35643 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the implicit fallback to DIRECT when proxies fail. This better ↵eroman@chromium.org2010-01-051-43/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | matches other browsers, and simplifies the code. To better understand what this means, here are some examples how the behaviors will differ for the user: (1) You start chrome with --proxy-server="foobar:80". The server "foobar:80" is refusing connections. Before: Would fallback to direct after failing to connect through foobar:80. Now: Will error-out with connection refused after failing to connect through foobar:80. (2) You start chrome with --proxy-pac-url="file:///foobar.pac". The server "foobar:80" is unreachable, and foobar.pac reads: function FindProxyForURL(url, host) { return "PROXY foobar:80"; } Before: Would fallback to direct after failing to connect through foobar:80. Now: Will error-out with connection refused after failing to connect through foobar:80. (3) You start chrome with --proxy-pac-url="file:///foobar.pac". The server "foobar:80" is unreachable, and foobar.pac reads: function FindProxyForURL(url, host) { return "PROXY foobar:80; DIRECT"; } *No change, since the fallback to DIRECT is explicit in the PAC script* BUG=12303 Review URL: http://codereview.chromium.org/502068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35549 0039d316-1c4b-4281-b951-d872f2087c98
* Extend LoadLog to support logging of arbitrary strings, and of network error ↵eroman@chromium.org2009-12-211-3/+3
| | | | | | | | | | | | | | codes. - The logging of error codes is intended to be used in passive mode. - The logging of string messages is intended to be used when in full-logging mode. - The logging of string literal messages is intended to be used in passive mode. BUG=27552 Review URL: http://codereview.chromium.org/503066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35103 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new event to LoadLog:eroman@chromium.org2009-12-011-12/+12
| | | | | | | | | | | | | | | | | PROXY_SERVICE_POLL_CONFIG_SERVICE_FOR_CHANGES which measures how much time was spent per request retrieving the system proxy settings. On Windows this corresponds with the function: WinHttpGetIEProxyConfigForCurrentUser(). Which seems to be very slow on some systems. BUG=12189 Review URL: http://codereview.chromium.org/452034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33508 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-201-2/+4
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* NULL out the ProxyScriptFetcher used by ProxyService when the ↵eroman@chromium.org2009-11-181-1/+58
| | | | | | | | | | | | URLRequestContext it was using for downloads is destroyed. This avoids the possibility of accessing freed memory when sharing ProxyService amongst request context, and the main context is destroyed first. BUG=25338 Review URL: http://codereview.chromium.org/387065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32427 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the display of LoadLogs when truncation occurs.eroman@chromium.org2009-11-061-3/+3
| | | | | | | | | | | | | | Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log. This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was. Also makes LoadLog take the bound as a required parameter. BUG=none TEST=LoadLogUtilTest.DisplayOfTruncated Review URL: http://codereview.chromium.org/363025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31274 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some style nits in unittests.eroman@chromium.org2009-08-201-3/+3
| | | | | | | | | * Changed the indentation for long lines of "ExpectLogContains()". * Moved host_resolver_impl_unittest into the net namespace to avoid lots of redundant net:: prefixes. Review URL: http://codereview.chromium.org/173137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23902 0039d316-1c4b-4281-b951-d872f2087c98
* Reference count ProxyService.eroman@chromium.org2009-08-181-143/+160
| | | | | | | | | | | | | This is necessary since ProxyService is getting shared between chrome's url request contexts (off the record, media), and the current way it is being shared could result in free memory read/writes during shutdown. This is a step towards fixing http://crbug.com/15289. BUG=http://crbug.com/15289 TEST=The existing tests should continue to pass following this refactor. Review URL: http://codereview.chromium.org/165430 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23612 0039d316-1c4b-4281-b951-d872f2087c98
* Instrument ProxyService and InitProxyResolver with LoadLog.eroman@chromium.org2009-08-171-3/+34
| | | | | | | | BUG=http://crbug.com/14478 Review URL: http://codereview.chromium.org/172020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23573 0039d316-1c4b-4281-b951-d872f2087c98
* LoadLog is used as an output parameter, reorder it to the last parameter.willchan@chromium.org2009-08-141-70/+70
| | | | | | Review URL: http://codereview.chromium.org/164531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23419 0039d316-1c4b-4281-b951-d872f2087c98