summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_service.cc
Commit message (Collapse)AuthorAgeFilesLines
* Display the "effective" proxy settings in about:net-internals.eroman@chromium.org2010-08-281-14/+15
| | | | | | | | | | | | The "effective" settings is what you get after applying the various fallbacks between automatic and manual settings. This display makes it easier to notice whether "auto-detect" actually took effect, and if so what was the PAC URL it used. BUG=53549 TEST=On windows change your proxy settings to include both auto-detect, a custom pac script, and some manually configured proxy servers. Now run chrome and go to the proxy tab on about:net-internals. Check that the "original" settings is what you entered in the dialog box, however the "effective" settings will only be a subset of them. Review URL: http://codereview.chromium.org/3241002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57767 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce an artificial 2 second delay after network IP address changes ↵eroman@chromium.org2010-08-261-2/+52
| | | | | | | | | | | | | | | 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
* Make sure the key into the spdy session pool identifies the actual proxy ↵eroman@chromium.org2010-08-251-0/+48
| | | | | | | | | | used, and not the full list of possible proxies for the URL. BUG=52668 TEST=SpdyNetworkTransactionTest.DirectConnectProxyReconnect Review URL: http://codereview.chromium.org/3192011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57274 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: 1st draft of ProxyConfigService for chromeoskuan@chromium.org2010-08-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | what this cl is: - a REALLY bare skeleton implementation of ProxyConfigService for chromeos (lots of design details remain to be worked out on the chromeos side, but i needed to get something basic up) - focused on getting chrome part correct, extracting design flow and implementation from linux variant that are relevant to chromeos, e.g.: - provide access of ProxyConfigService interface on IO thread - provide methods on UI thread for UI to read/modify proxy config (like linux's GConf notifications on UI thread) - fetch initial config on UI thread (this is not absolutely necessary for chromeos, 'cos i don't use GConf, but i just follow linux for now) - however, the class is RefCountedThreadSafe (so that both net::ProxyService and DOMUI can access it), and the code resides in chrome/browser/chromeos dir instead of net/proxy. - design details are in .h files - initial config is hardcoded as pac script and loaded as owner (TODO: load this from cros settings persisted on chromeos device) - this should work like the current chromeos session manager which sets the auto-proxy environment variable in login script to the same pac script - implement an augmented analogue to net::ProxyConfig to hold actual proxy config and UI settings (e.g. source and readonly attributes) - backend uses this as the main proxy config, and only converts it to net:::ProxyConfig for network stack on the IO thread in net::ProxyService::GetLatestProxyConfig. - UI methods also use this structure - provide methods to get and set configs from UI thread - UI can use dom_ui->GetProfile()->GetChromeOSProxyConfigServiceImpl() to access these methods on the UI thread - these methods are by no means final - i only added them here to verify the design flow that modifications can be made from UI thread and picked up by IO thread. - david and i will improve or modify them to whatever works best for frontend and backend. - unittest that tests most functionalities: socks and bypass_rules will be enabled in a later cl. TODOs after this cl: - work with UI, load initial config as owner from cros settings - implement policy mechanism, merge it with owner during initial load and modifications - persist proxy settings - etc etc etc BUG=chromium-os:5127 TEST=nothing yet. Review URL: http://codereview.chromium.org/3047052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57204 0039d316-1c4b-4281-b951-d872f2087c98
* Emit an event to NetLog whenever the proxy settings change.eroman@chromium.org2010-08-131-2/+44
| | | | | | | | | | Also removes the operator<< on ProxyConfig. BUG=52004 Review URL: http://codereview.chromium.org/3144008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55999 0039d316-1c4b-4281-b951-d872f2087c98
* Use notification-based API for getting system proxy settings on Mac rather ↵eroman@chromium.org2010-07-301-1/+1
| | | | | | | | | than polling. BUG=50587 Review URL: http://codereview.chromium.org/3078009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54288 0039d316-1c4b-4281-b951-d872f2087c98
* Change the ProxyConfigService interface to be asynchronous, and support ↵eroman@chromium.org2010-07-231-132/+92
| | | | | | | | | | | | 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-4/+3
| | | | | | | 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
* Attempt four at landing the "histogram.h removed from message_loop.h" patch.erg@chromium.org2010-07-151-0/+1
| | | | | | | | | | | | | | Previously committed as r52349 and r52336. Related commits: r52367, r52364 and r52343. Rerunning trybots due to previous trybot breakage. TEST=none BUG=none Review URL: http://codereview.chromium.org/2965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52496 0039d316-1c4b-4281-b951-d872f2087c98
* Revert everything related to the relanding.erg@chromium.org2010-07-141-1/+0
| | | | | | Review URL: http://codereview.chromium.org/2982009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52367 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52336.erg@chromium.org2010-07-141-0/+1
| | | | | | | | | | | | | | (I accidentally committed a previous version of the patch (the fixed version was in codereview since I had switched to my mac to address this exact compile failure.) BUG=none TEST=none TBR=evan Review URL: http://codereview.chromium.org/2937010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52349 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 52336 - More header cleanup:erg@chromium.org2010-07-141-1/+0
| | | | | | | | | | | | | | | | - Some cleanup to url_request.h - Remove task.h from headers that don't need it. - Remove histogram.h from message_loop.h BUG=none TEST=none Review URL: http://codereview.chromium.org/2986002 TBR=erg@chromium.org Review URL: http://codereview.chromium.org/2969006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52343 0039d316-1c4b-4281-b951-d872f2087c98
* More header cleanup:erg@chromium.org2010-07-141-0/+1
| | | | | | | | | | | | | - Some cleanup to url_request.h - Remove task.h from headers that don't need it. - Remove histogram.h from message_loop.h BUG=none TEST=none Review URL: http://codereview.chromium.org/2986002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52336 0039d316-1c4b-4281-b951-d872f2087c98
* Display the proxy PAC javascript errors in the NetLog.eroman@chromium.org2010-07-141-9/+21
| | | | | | | | BUG=47226 TEST=Configure chrome with a PAC script that throws errors. Load a URL and should see the javascript error displayed on about:net-internals. Review URL: http://codereview.chromium.org/2978001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52253 0039d316-1c4b-4281-b951-d872f2087c98
* Change the default number of proxy resolver threads used for evaluating PAC ↵eroman@chromium.org2010-07-101-4/+8
| | | | | | | | | | | scripts from 1 to 4. Also adds a command line flag to override the default: --num-pac-threads=X BUG=11079 Review URL: http://codereview.chromium.org/2893005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52046 0039d316-1c4b-4281-b951-d872f2087c98
* Add the capability to run multiple proxy PAC scripts in parallel.eroman@chromium.org2010-07-091-35/+61
| | | | | | | | | | | | | Refactors SingleThreadedProxyResolver into MultiThreadedProxyResolver. New threads are created lazily on demand, up to a fixed maximum. Note that this CL does NOT change the policy in Chrome -- it will continue to use a single thread for proxy resolving, but using the new code to do so. BUG=11079 Review URL: http://codereview.chromium.org/2822043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51924 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 51877, since SpdyNetworkTransactionTest.CorruptFrameSessionError ↵eroman@chromium.org2010-07-081-61/+35
| | | | | | | | | | | | | | | | | | | | | | | | started failing after this check-in (but only on vista modules builder). BUG=48588 Original CL description: Add the capability to run multiple proxy PAC scripts in parallel. Refactors SingleThreadedProxyResolver into MultiThreadedProxyResolver. New threads are created lazily on demand, up to a fixed maximum. Note that this CL does NOT change the policy in Chrome -- it will continue to use a single thread for proxy resolving, but using the new code to do so. BUG=11079 Review URL: http://codereview.chromium.org/2822043 TBR=eroman@chromium.org Review URL: http://codereview.chromium.org/2945004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51893 0039d316-1c4b-4281-b951-d872f2087c98
* Add the capability to run multiple proxy PAC scripts in parallel.eroman@chromium.org2010-07-081-35/+61
| | | | | | | | | | | | | Refactors SingleThreadedProxyResolver into MultiThreadedProxyResolver. New threads are created lazily on demand, up to a fixed maximum. Note that this CL does NOT change the policy in Chrome -- it will continue to use a single thread for proxy resolving, but using the new code to do so. BUG=11079 Review URL: http://codereview.chromium.org/2822043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51877 0039d316-1c4b-4281-b951-d872f2087c98
* Optimization: reduce the copying of string data between C++ and javascript ↵eroman@chromium.org2010-07-011-1/+1
| | | | | | | | | | | | | | | 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-21/+8
| | | | | | | | | | | | | | * 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-9/+9
| | | | | | | | | 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
* More cleanup to address TODOs in net_log.h.eroman@chromium.org2010-04-281-13/+16
| | | | | | | | | | | * Removes 9 methods: AddEventWithParameters, BeginEventWithParameters, EndEventWithParameters, BeginEventWithString, BeginEventWithInteger, AddEventWithString, AddEventWithInteger, EndEventWithParameters, EndEventWithInteger. This was becoming ridiculous, instead made the EventParameters* a required parameter. * Moves CapturingBoundNetLog / CapturingNetLog to its own file. BUG=37421 Review URL: http://codereview.chromium.org/1746012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45843 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Address some of the todos in net_log.heroman@chromium.org2010-04-271-5/+6
| | | | | | | | | | | - Get rid of the AddString() and AddStringLiteral() methods. - Make EventParameters able to serialize to JSON, instead of a string. BUG=37421 Review URL: http://codereview.chromium.org/1716007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45750 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a deadlock that could happen during shutdown if a host resolve request ↵eroman@chromium.org2010-04-171-10/+20
| | | | | | | | | | | | | was outstanding by a PAC script. The solution is to abort the oustanding host resolver request during shutdown, and wake-up the blocked PAC thread. BUG=41244 TEST=SingleThreadedProxyResolverWithBridgedHostResolverTest.ShutdownDeadlock Review URL: http://codereview.chromium.org/1527037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44864 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for attaching custom parameters to NetLog events.eroman@chromium.org2010-04-091-3/+3
| | | | | | | | BUG=37421 Review URL: http://codereview.chromium.org/1556018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44057 0039d316-1c4b-4281-b951-d872f2087c98
* Move over another legacy "LoadLog-style" event generator to routing its ↵eroman@chromium.org2010-03-161-8/+11
| | | | | | | | | | 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-50/+51
| | | | | | | | | | | | | | | | 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-39/+2
| | | | | | | | | 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-85/+1
| | | | | | | | | | | | | | 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-4/+14
| | | | | | | | | | | | 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
* Add a histogram to record how long fetching the system proxy settings takes:eroman@chromium.org2010-01-281-0/+11
| | | | | | | | | | | Net.ProxyPollConfigurationTime On Windows, this corresponds to the duration of WinHttpGetIEProxyConfigForCurrentUser(), which we have seen can run very slowly on some systesm. This histogram tries to gauge the extent of the problem. BUG=12189 Review URL: http://codereview.chromium.org/553122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37352 0039d316-1c4b-4281-b951-d872f2087c98
* Add more functionality to about:net-internals:eroman@chromium.org2010-01-131-0/+8
| | | | | | | | | | | | | (1) Display the cached bad proxies, and how long until they will be retried (addresses an old TODO). (2) Add a button to clear the bad proxies cache. (3) Add a button to force refetching of the proxy configuration (this can be used to force refetch of PAC files, very convenient when testing). BUG=none TEST=none Review URL: http://codereview.chromium.org/541045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36159 0039d316-1c4b-4281-b951-d872f2087c98
* Retry proxies which were cached as bad before giving up.eroman@chromium.org2010-01-121-1/+1
| | | | | | | | | | | 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-5/+28
| | | | | | | | | | | | | | | 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-11/+26
| | | | | | | | | | | | | | 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
* Remove the implicit fallback to DIRECT when proxies fail. This better ↵eroman@chromium.org2010-01-051-60/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Separate ProxyResolverMac and ProxyConfigServiceMac into their own files and ↵hayato@chromium.org2009-12-101-0/+1
| | | | | | | | | | extract common utility functions into other files. TEST=trybot and MacUtilTest in base_unittests BUG=27310 Review URL: http://codereview.chromium.org/463028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34243 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to the string MatchPattern functions:tony@chromium.org2009-12-031-1/+1
| | | | | | | | | | | | | | | 1) Make it explicit that it only supports ASCII (since it iterates character by character). 2) Limit the recursion to 16 levels. We could allow more, but in the case of a ?, it has exponential complexity, so I figured 16 was a good stopping point. It seems rare that someone would have more than 16 '?' and '*'s. BUG=28645 Review URL: http://codereview.chromium.org/460047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33748 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new event to LoadLog:eroman@chromium.org2009-12-011-7/+15
| | | | | | | | | | | | | | | | | 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
* NULL out the ProxyScriptFetcher used by ProxyService when the ↵eroman@chromium.org2009-11-181-9/+32
| | | | | | | | | | | | 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-1/+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
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-051-0/+4
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
* Move initialization of ChromeURLRequestContexts to the IO thread.eroman@chromium.org2009-10-231-8/+3
| | | | | | | | | | | | | | | | | | | | | | | Before, these URLRequestContexts were lazily created from the UI thread. Unfortunately that model made it easy for consumers on the UI thread to poke at stuff which was being used from the IO thread, and introduce races. So instead of providing a URLRequestContext*, the Profile now vends a URLRequestContextGetter*. The consequence of this is: * Consumers on the UI thread can no longer get access to a URLRequestContext. * Consumers on the IO thread need to call URLRequestContextGetter::GetURLRequestContext() to get at the context. This uses the same style lazy-creation of URLRequestContexts, albeit from the IO thread. OK, so now the smelly part: There were a couple of consumers of URLRequestContext on the UI thread that can't easily be moved to the IO thread -- these are the consumers of the cookie store. Before they could happily mess with the cookie store from the UI thread, and this was fine since CookieStore is threadsafe. However under the new model, they have no way to get at the URLRequestContext from the UI thread, hence can't get a pointer to the cookie store. To support that use-cases, I bastardized the API some by adding a URLRequestContextGetter::GetCookieStore() method that lets UI thread consumers get a pointer to the cookie store, since we know this particular cross-thread usage is safe. BUG=http://crbug.com/22294 Review URL: http://codereview.chromium.org/258008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29880 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to purge memory to the ProxyResolver.pkasting@chromium.org2009-10-131-0/+5
| | | | | | | | BUG=23400 TEST=none Review URL: http://codereview.chromium.org/272018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28769 0039d316-1c4b-4281-b951-d872f2087c98
* Add trace points for the "dnsResolve()" and "myIpAddress()" PAC javascript ↵eroman@chromium.org2009-09-101-5/+3
| | | | | | | | | | | | | | bindings. This makes note of the calls in the request's LoadLog. Since the LoadLog is not thread-safe, SingleThreadedProxyResolver creates a private LoadLog for ProxyResolverV8 to write into, and then copies it into the mainLoadLog on completion (on the origin thread). BUG=http://crbug.com/14478 Review URL: http://codereview.chromium.org/193037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25926 0039d316-1c4b-4281-b951-d872f2087c98
* Aesthetic changes to the proxy configuration log format.eroman@chromium.org2009-09-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also in this change, I stop brodacasting the proxy settings changes to LOG(INFO) --- This is because navigating to "view-net-internal:proxyservice.config" offers a better solution, so no point polluting the log file. Note that the format change is intended to make the string more succint and human readable. For example, here is a before and after comparison: ------------ New version: ------------ Automatic settings: Auto-detect: No Custom PAC script: [None] Manual settings: Proxy server: [None] Bypass list: [None] Bypass local names: No ------------ Old version: ------------ { auto_detect: 0 pac_url: proxy_rules: { type: TYPE_NO_RULES single_proxy: proxy_for_http: proxy_for_https: proxy_for_ftp: socks_proxy: } proxy_bypass_local_names: 0 proxy_bypass_list: id: 1 } BUG=http://crbug.com/14478 TEST=ProxyConfigTest.ToString Review URL: http://codereview.chromium.org/198039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25584 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: get GNOME or KDE proxy settings.mdm@chromium.org2009-08-281-8/+12
| | | | | | | | | BUG=17363, 20407 TEST=none Review URL: http://codereview.chromium.org/174327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24831 0039d316-1c4b-4281-b951-d872f2087c98
* Reference count ProxyService.eroman@chromium.org2009-08-181-0/+3
| | | | | | | | | | | | | 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-12/+48
| | | | | | | | 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-19/+19
| | | | | | Review URL: http://codereview.chromium.org/164531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23419 0039d316-1c4b-4281-b951-d872f2087c98