summaryrefslogtreecommitdiffstats
path: root/net/proxy
Commit message (Collapse)AuthorAgeFilesLines
* * Move the global "DnsResolutionObserver" code depended on by DNS ↵ericroman@google.com2009-06-151-7/+6
| | | | | | | | | | | | | | prefetcher, into HostResolver. This has the advantage that consumers of DNS no longer have to remember to call "DidFinishDnsResolutionWithStatus()" followed by "DidStartDnsResolution()" in order for the prefetcher to observe the resolution. Instead it just happens automatically, and subscribers register via HostResolver::AddObserver() on a particular resolver instance. * To accomodate the prefetcher's observer, HostResolver::Resolve() needs an additional "referrer" parameter. This is slightly awkward since "referrer" has nothing to do with the actual resolve request. To simplify plumbing through this and other optional parameters, Resolve() was changed to take a "RequestInfo&" parameter in place of say {hostname, port, flags}. * Added an option to HostResolver::Resolve() for disallowing cached responses (RequestInfo::allow_cached_response). This will be used when you refresh a page, to bypass the host cache. The code to do this has been added to HttpNetworkTransaction, but is commented out pending an appropriate unit-test to verify it. BUG=14056 Review URL: http://codereview.chromium.org/125107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18371 0039d316-1c4b-4281-b951-d872f2087c98
* * Avoid doing concurrent DNS resolves of the same hostname in HostResolver.ericroman@google.com2009-06-126-35/+132
| | | | | | | | | | | | | | | | * Add a 1 minute cache for host resolves. * Refactor HostResolver to handle multiple requests. * Make HostResolver a dependency of URLRequestContext. operate the HostResolver in async mode for proxy resolver (bridging to IO thread). TEST=unittests BUG=13163 Review URL: http://codereview.chromium.org/118100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18236 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the http cache when fetching PAC scripts. Also adds an extra log ↵eroman@chromium.org2009-06-032-10/+42
| | | | | | | | | | | | | | statement for when response is non-200. The cache is disabled to avoid problems when switching networks (wouldn't want to re-use cached response from old network after switching to new network). This is only a partial piece for 12293 (still needs to re-trigger auto-detect on network change). BUG=12293 Review URL: http://codereview.chromium.org/118032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17572 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in net/phajdan.jr@chromium.org2009-05-291-0/+1
| | | | | | | | TEST=none Review URL: http://codereview.chromium.org/115870 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17178 0039d316-1c4b-4281-b951-d872f2087c98
* Re-do of r16741 (http://codereview.chromium.org/113482).robertshield@google.com2009-05-223-0/+63
| | | | | | | | | | Moved the new automation message in automation_messages_internal.h to the END of the enum as per the large scary warning that I skillfully missed last time around. TBR=amit Review URL: http://codereview.chromium.org/115711 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16754 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of r16741 which appeared to cause a perf regression (???) on the ↵robertshield@google.com2009-05-223-63/+0
| | | | | | | | | | builder. TBR=thomasvl Review URL: http://codereview.chromium.org/115708 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16742 0039d316-1c4b-4281-b951-d872f2087c98
* Adding the ability to alter Chrome's proxy settings via the automation ↵robertshield@google.com2009-05-223-0/+63
| | | | | | | | interface for automated testing. Review URL: http://codereview.chromium.org/113482 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16741 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gconf for the linux proxy config service.sdoyon@chromium.org2009-05-227-175/+611
| | | | | | | | | | | | | | | | | | | | | | | | -Reenables fetching of settings from gconf. -Moves all gconf access to happen from the UI thread only, (where the default glib main loop runs). -Adds support for gconf notifications, avoiding having to poll the settings. -Fixes a small initialization glitch in the unittest. Plus minor code style tweaks. -Permanently removes gdk and glib threading initialization calls that were previously disabled. -Slight reorganization of ProxyService creation to pass down the IO thread MessageLoop. BUG=11111 TEST=none Review URL: http://codereview.chromium.org/113043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16739 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo (one extra '!') in the previous checkin (r13601).wtc@chromium.org2009-05-221-1/+1
| | | | | | | R=eroman Review URL: http://codereview.chromium.org/113730 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16696 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the UI for HTTP/FTP auth challenges to include the server's port. So ↵ericroman@google.com2009-05-212-1/+2
| | | | | | | | | | | instead of "www.foo.com" it will say "www.foo.com:80". We need to include the port number since otherwise it can be ambiguous what the actual target server is. This change also introduces utility function "GetHostAnd[Optional]Port()" to help with forming <host> [":" <port>] strings. BUG=12073 Review URL: http://codereview.chromium.org/112041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16672 0039d316-1c4b-4281-b951-d872f2087c98
* Reorganize the ProxyService::Create() and ↵eroman@chromium.org2009-05-192-48/+62
| | | | | | | | | | | ProxyService::CreateWithoutV8Resolver() methods. Instead of using a NULL ProxyResolver dependency in cases where PAC is not supported, it uses a ProxyResolverNull (always fail) implementation. This is to avoid needing to check in other cases (when v8 is unsupported) if there is a non-null ProxyResolver. Review URL: http://codereview.chromium.org/115532 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16413 0039d316-1c4b-4281-b951-d872f2087c98
* Include C system headers before C++ system headers.wtc@chromium.org2009-05-181-0/+2
| | | | | | | | | | | | | | | | Document that GetHostAndPort returns an IPv6 literal address with square brackets. Document that the host parameter to the ProxyServer constructor takes an IPv6 literal address with square brackets. R=eroman BUG=N/A TEST=N/A Review URL: http://codereview.chromium.org/113494 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16287 0039d316-1c4b-4281-b951-d872f2087c98
* Change the host() method of ProxyServer to strip thewtc@chromium.org2009-05-143-4/+49
| | | | | | | | | | | | | | | | | | | | | square brackets around an IPv6 literal address. Rename the method HostNoBrackets() to be consistent with GURL's new HostNoBrackets() method. When resolving an address, use the new HostNoBrackets() method instead of host(). Part of this changelist was contributed by Paul Marks of Google. Original review: http://codereview.chromium.org/115342 R=eroman http://crbug.com/12005 TEST=covered by new test cases in unit test Review URL: http://codereview.chromium.org/114029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16123 0039d316-1c4b-4281-b951-d872f2087c98
* Making command-line specified proxy settings more flexible - allowing for ↵robertshield@google.com2009-05-129-104/+162
| | | | | | | | | | setting of auto-detect, pac url, per-schema proxy settings, proxy bypass urls. BUG=http://crbug.com/266 Review URL: http://codereview.chromium.org/115029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15855 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disable gconf usage from ProxyConfigServiceLinux because of Glib ↵deanm@chromium.org2009-05-062-0/+5
| | | | | | | | | | | | | races. Patch by Stephane Doyon. BUG=11442 Review URL: http://codereview.chromium.org/109040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15404 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of the static next_id_ counter, to make construction of ProxyConfig ↵ericroman@google.com2009-05-044-19/+38
| | | | | | | | | on different threads safe. BUG=11323 Review URL: http://codereview.chromium.org/102023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15209 0039d316-1c4b-4281-b951-d872f2087c98
* linux: obey proxy environment variables in preference to gconfevan@chromium.org2009-05-042-1/+25
| | | | | | | | | | | This fixes a tiny bug, where we were consulting gnome's settings based on whether the DESKTOP_SESSION *wasn't* gnome. TEST=Covered by new unit test. Review URL: http://codereview.chromium.org/100318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15184 0039d316-1c4b-4281-b951-d872f2087c98
* Allows a proxy bypass entry to match on a specific port, used by thesdoyon@chromium.org2009-04-203-53/+188
| | | | | | | | | | linux ProxyConfigService. BUG=8143 Review URL: http://codereview.chromium.org/73038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14044 0039d316-1c4b-4281-b951-d872f2087c98
* ProxyConfigService for Linux.sdoyon@chromium.org2009-04-2010-51/+1509
| | | | | | | | | | | | | | | Establishes a ProxyConfig by reading settings from gconf or consulting environment variables. BUG=8143 Thanks to ermilov.maxim@gmail.com for his contribution: some ideas< and code snippets from his patch were folded into this one. (See http://codereview.chromium.org/49009) Review URL: http://codereview.chromium.org/60009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14034 0039d316-1c4b-4281-b951-d872f2087c98
* Add some LOG(INFO) to help diagnose problems when proxy is not working.ericroman@google.com2009-04-134-3/+108
| | | | | | | | | - Dump the proxy configuration to LOG(INFO) each time it changes - Log each attempt at downloading a PAC script. Review URL: http://codereview.chromium.org/67053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13601 0039d316-1c4b-4281-b951-d872f2087c98
* Extract the parsing of proxy rules to ProxyConfig::ProxyRules, and unit-test.ericroman@google.com2009-03-3115-104/+465
| | | | | | | | | | This avoids re-parsing the rules every time a proxy resolve is done, and also adds extra tolerance for white space. The other motivation is to not have to fiddle around with strings as much in the various ProxyConfigServceXXXX implementations. Review URL: http://codereview.chromium.org/57011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12829 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test for ProxyConfigServiceWin.ericroman@google.com2009-03-273-10/+193
| | | | | | Review URL: http://codereview.chromium.org/55001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12695 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a race in proxy_service_unittest.cc that was causing flakiness on purify ↵ericroman@google.com2009-03-251-35/+102
| | | | | | | | | | | | | build-bot. The issue is that the test helper "SyncProxyService" is deleting the underlying ProxyService from the main thread, it should instead be deleted from IO thread. Deleting from the main thread allows for a small window where deletion of ProxyService can begin while ProxyService::ProcessRequestsQueue() is still executing. BUG=8738 Review URL: http://codereview.chromium.org/42596 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12523 0039d316-1c4b-4281-b951-d872f2087c98
* GetMyHostName is renamed GetHostName to match the name ofwtc@chromium.org2009-03-251-1/+1
| | | | | | | | | the Unix/Winsock function gethostname. R=eroman Review URL: http://codereview.chromium.org/42590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12466 0039d316-1c4b-4281-b951-d872f2087c98
* CFNetworkExecuteProxyAutoConfigurationURL() chokes if the query url is NULL, ↵pinkerton@chromium.org2009-03-201-2/+6
| | | | | | | | and CFURL loves to be NULL when it can't parse something. Fixes a crash loading a horrific looking URL on espn.com Review URL: http://codereview.chromium.org/50064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12205 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrect include guards in net/, where the guard didn't match the filename.deanm@chromium.org2009-03-171-3/+3
| | | | | | | | | Also add a guard to data_url.h which was missing a guard. Review URL: http://codereview.chromium.org/42282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11865 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-1119-19/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* Slight code change to make some global variables const.maruel@google.com2009-03-101-2/+2
| | | | | | | Fix >80 cols lines. Review URL: http://codereview.chromium.org/42013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11342 0039d316-1c4b-4281-b951-d872f2087c98
* Add the proxy resolver perftest to GYP.ericroman@google.com2009-03-061-2/+2
| | | | | | | | BUG=2764 Review URL: http://codereview.chromium.org/39239 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11082 0039d316-1c4b-4281-b951-d872f2087c98
* Add performance tests for the proxy resolver implementations.ericroman@google.com2009-03-061-0/+191
| | | | | | | | | I downloaded the test data "no-ads.pac" from <http://ap.coova.org/wpad.dat>. BUG=2764 Review URL: http://codereview.chromium.org/40149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11066 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-0511-46/+46
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Fix error being thrown in isInNet() PAC js.ericroman@google.com2009-03-041-1/+2
| | | | | | | | | | | | | | | | | | | Mozilla is using notation which treats regexp like a function: var regex = /foo/; var result = regex("str"); However v8 does not allow this (nor does IE), so we rewrite it in standard form: var regex = /foo/; var result = regex.exec("str") Also finishes off the tests in pac_library_unittest.js. I didn't test every single permutation of dateRange() and timeRange() as there are way too many; but did hit most common flavors. BUG=2764 Review URL: http://codereview.chromium.org/40006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10843 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line flag --v8-proxy-resolver, to select the new PAC ↵ericroman@google.com2009-03-032-3/+51
| | | | | | | | | | | | | | | | | | implementation. When running in single process mode, this flag has no effect (since we can't run side by side with the renderer's V8). In regular mode, the v8 resolver is currently running in the browser process. This means it has to share with the v8 debugger shell. Added locking around the debugger shell so they can peacefully co-exist. When this flag is enabled, PAC scripts are downloaded through the browser. BUG=74,2764 Review URL: http://codereview.chromium.org/27365 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10827 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the PAC js-binding for "myIpAddress()".ericroman@google.com2009-03-032-4/+23
| | | | | | | BUG=2764 Review URL: http://codereview.chromium.org/38001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10824 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing header (breaks on linux).ericroman@google.com2009-03-021-0/+1
| | | | | | | | TBR=wtc@chromium.org Review URL: http://codereview.chromium.org/27356 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10741 0039d316-1c4b-4281-b951-d872f2087c98
* split up proxy_service into several files (one per class).ericroman@google.com2009-03-0223-456/+617
| | | | | | Review URL: http://codereview.chromium.org/28278 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10739 0039d316-1c4b-4281-b951-d872f2087c98
* Add js bindings layer for ProxyResolverV8 {"alert()", "dnsResolve()", ↵ericroman@google.com2009-03-023-61/+463
| | | | | | | | | | | "myIpAddress" <-- [partial]}. Also adds a utility function to net_util for turning a addrinfo into an IP address string. BUG=2764 Review URL: http://codereview.chromium.org/31009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10730 0039d316-1c4b-4281-b951-d872f2087c98
* Update a WARNING with a bug URL.evan@chromium.org2009-02-271-5/+5
| | | | | | Review URL: http://codereview.chromium.org/28228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10547 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 10251.ericroman@google.com2009-02-251-1/+2
| | | | | | | | | | | This re-lands the dependency on v8 by net (http://codereview.chromium.org/28049) It was rolled back before because of failure compiling on submodule buildbot. Marc-Antoine has updated those builders to checkout v8, so this should work now. Review URL: http://codereview.chromium.org/27160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10409 0039d316-1c4b-4281-b951-d872f2087c98
* Use string for Histogram names since these are all ASCII anyway.dsh@google.com2009-02-241-3/+2
| | | | | | | | 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
* Reverting 10250.ericroman@google.com2009-02-241-2/+1
| | | | | | | Rolling back since the windows module builders are failing ot find v8 project... Review URL: http://codereview.chromium.org/27081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10251 0039d316-1c4b-4281-b951-d872f2087c98
* Add v8 as dependency of net.ericroman@google.com2009-02-241-1/+2
| | | | | | | | | | | This is needed for ProxyResolverV8, which executes proxy auto config scripts. See bug 2764. This CL has changes for {xcode, visualstudio}, but not {scons} yet. Review URL: http://codereview.chromium.org/28049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10250 0039d316-1c4b-4281-b951-d872f2087c98
* Add ProxyResolverV8 class.darin@chromium.org is the original author of ↵ericroman@google.com2009-02-234-0/+686
| | | | | | | | 'proxy_resolver_v8.cc' and 'proxy_resolver_script.h'. Review URL: http://codereview.chromium.org/21391 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10199 0039d316-1c4b-4281-b951-d872f2087c98
* Add support to ProxyService for downloading a PAC script on behalf of the ↵ericroman@google.com2009-02-235-52/+776
| | | | | | | | ProxyResolver. A ProxyResolver can select this new behavior by subclassing ProxyResolver with |does_fetch = false|. A consequence of this change is that proxy resolve requests are maintained in a queue by ProxyService (rather than implicitly in a queue on the PAC thread's message loop). This simplifies cancellation.This solves issue 7461, and is work-in-progress towards {2764, 74}BUG=7461 Review URL: http://codereview.chromium.org/21328 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10197 0039d316-1c4b-4281-b951-d872f2087c98
* Include entries for SOCKS in ProxyResolverMac.ericroman@google.com2009-02-193-80/+92
| | | | | | Review URL: http://codereview.chromium.org/20489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10049 0039d316-1c4b-4281-b951-d872f2087c98
* Fix header order.ericroman@google.com2009-02-191-2/+2
| | | | | | Review URL: http://codereview.chromium.org/20487 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10013 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix build bustage.ericroman@google.com2009-02-191-0/+2
| | | | | | | TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/20485 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10011 0039d316-1c4b-4281-b951-d872f2087c98
* Add parsing for PAC result strings -- ProxyInfo::UsePacString().ericroman@google.com2009-02-1910-105/+775
| | | | | | | | | | | Added the support class ProxyServer to avoid losing the proxy server's type information (http, socks) when populating the list. The format of the configuration strings has been extended accordingly to include an optional [<scheme>"://"] prefix. (i.e. "http://", "socks4://", "socks5://"). Review URL: http://codereview.chromium.org/20398 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10010 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of synchronous ResolveProxy API.ericroman@google.com2009-01-313-150/+130
| | | | | | | Also remove the ProxyInfo::Apply method. Review URL: http://codereview.chromium.org/19502 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9015 0039d316-1c4b-4281-b951-d872f2087c98
* Move proxy resolve requests out of plugin/renderer process, and into the ↵ericroman@google.com2009-01-312-2/+89
| | | | | | | | browser. Review URL: http://codereview.chromium.org/14142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9006 0039d316-1c4b-4281-b951-d872f2087c98