summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_config_service_linux.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix problem when interpreting Gnome proxy settings, where http, https, and ↵eroman@chromium.org2011-04-301-32/+40
| | | | | | | | | | | ftp proxies were ignored when a SOCKS proxy was specified. BUG=80937 TEST=See screenshot in comment #0 of the bug thread for repro steps. Review URL: http://codereview.chromium.org/6883284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83655 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: upgrade a DCHECK to CHECK to try and catch bug 75508 in action.mdm@chromium.org2011-04-281-2/+2
| | | | | | | BUG=75508 Review URL: http://codereview.chromium.org/6883218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83361 0039d316-1c4b-4281-b951-d872f2087c98
* Allow ProxyConfigService to report "no configuration set"mnissler@chromium.org2011-04-111-8/+12
| | | | | | | | | | | 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
* Introduce incognito preference settings.battre@chromium.org2011-01-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL introduces preference settings for incognito windows. The semantics are the following: - An extension can set regular preferences as before. These affect regular and incognito windows. - An extension can set regular preferences *and* incognito preferences. In this case, the incognito preferences affect only incognito windows. - If extension A sets reg+incognito, extension B sets reg but no incognito, extension B has higher precedence than A --> B's preferences hold for all regular and incognito windows. - Incognito preferences are never persisted to disk. In order to realize this, the ExtensionPrefs class allows setting regular and incognito extension controlled preferences. It allows creating an incognito version of the PrefService with an independent PrefValueStore. This (incognito) PrefValueStore and the original PrefValueStore share several of their PrefStores (i.e. DefaultPrefStore, CommandLinePrefStore, Configuration PrefStores) but differ in two pref stores: - We maintain two separate ExtensionPrefStores containing the effective preferences for regular and incognito windows. - We maintain two separate user pref stores. The regular JsonPrefStore is expanded by an OverlayPersistentPrefStore that maintains all write-operations in an in-memory overlay. Therefore, incognito changes are not visible in the file-backed JsonPrefStore. The two ExtensionPrefStores retrieve their effective values from a shared ExtensionPrefValueMap. The OffTheRecordProfileImpl provides a request_context_ that uses the new PrefService already. BUG=66027,69057 TEST=unit tests, will be fully testable once the Proxy Settings API allows incognito settings. Review URL: http://codereview.chromium.org/5915004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72489 0039d316-1c4b-4281-b951-d872f2087c98
* Deinline even more destructors.erg@google.com2010-12-141-0/+12
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69084 0039d316-1c4b-4281-b951-d872f2087c98
* Make GConf dependency optional.phajdan.jr@chromium.org2010-11-091-0/+6
| | | | | | | | | | | This is upstreaming a Gentoo Linux patch. BUG=13322 TEST=none Review URL: http://codereview.chromium.org/4691001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65507 0039d316-1c4b-4281-b951-d872f2087c98
* Move xdg_util into base/nix. I originally wanted to use base/linux, but youbrettw@chromium.org2010-10-161-9/+9
| | | | | | | | | | | | | | | | can't have a namespace called "linux" because it's ifdefed by GCC to be a number. Same for "unix". "x11" was discarded because some future stuff in here will not be related to x11. This also renames base_paths_posix to base_paths_linux since this does not apply to mac, and normally posix applies to mac (this confused me when I had to edit it for the XDG stuff). TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3778007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62848 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - net/.pkasting@chromium.org2010-10-161-9/+9
| | | | | | | | | | Also converts COOKIE_DLOG (since VLOG can be toggled on a granular basis), removes some unneeded "endl"s and {}s, aligns "<<"s per style guide, and changes KeygenHandler::GenKeyAndSignChallenge() to avoid using "goto". BUG=none TEST=none Review URL: http://codereview.chromium.org/3846001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62831 0039d316-1c4b-4281-b951-d872f2087c98
* Change the default SOCKS version used by gnome settings (and environment ↵eroman@chromium.org2010-09-281-10/+14
| | | | | | | | | | variables) to be 5 instead of 4. BUG=56833 TEST=Open Chrome in gnome. Go to change the proxy settings (which will pop open the gnome network settings). Enter as socks proxy server, "localhost:8080". Now load chrome://net-internals/#proxy and verify that it says the proxy server is "socks5://localhost:8080" (and NOT socks4://localhost:8080). Review URL: http://codereview.chromium.org/3413037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60734 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move code from .h to .cc in net/erg@google.com2010-09-151-0/+7
| | | | | | | | | | | Shaves a cumulative 400k off libnet/browser.a BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3432004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59533 0039d316-1c4b-4281-b951-d872f2087c98
* Moving file_util::FileInfo to base::PlatformFileInfo, and adding thedumi@chromium.org2010-09-031-2/+2
| | | | | | | | | | | | last_accessed and creation_time fields. BUG=none TEST=none Review URL: http://codereview.chromium.org/3347005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58454 0039d316-1c4b-4281-b951-d872f2087c98
* base: rename Environment::GetEnv to Environment::GetVar.tfarina@chromium.org2010-08-071-8/+8
| | | | | | | | | | | This is the part 4 and the latest of this series. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3029062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55326 0039d316-1c4b-4281-b951-d872f2087c98
* base: Rename EnvVarGetter to Environment.tfarina@chromium.org2010-08-031-8/+8
| | | | | | | | | | | | | | | Now EnvVarGetter do much more than getting environment variables. Per suggestion from Pawel in http://codereview.chromium.org/3043018/. BUG=None TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/3052034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54696 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more callers of the integer/string functions to usingbrettw@chromium.org2010-07-311-3/+8
| | | | | | | | | | string_number_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3013046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
* Move the number conversions from string_util to a new file.brettw@chromium.org2010-07-301-1/+2
| | | | | | | | | | | | | Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
* Change the ProxyConfigService interface to be asynchronous, and support ↵eroman@chromium.org2010-07-231-5/+22
| | | | | | | | | | | | 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
* base: add home environment variable to env_var.htfarina@chromium.org2010-07-211-1/+2
| | | | | | | | | | | BUG=None TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/2847058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53143 0039d316-1c4b-4281-b951-d872f2087c98
* KDE treats all host patterns as wildcard patternsdavidben@chromium.org2010-07-091-4/+19
| | | | | | | | | | | | | | Also correct a test description that became inaccurate when we supported a reversed bypass list, and remove spaces from host rules earlier. (KDE actually treats both comma and space as valid delimiters anyway.) R=wtc,eroman BUG=48486 TEST=ProxyConfigServiceLinuxTest.KDEConfigParser Review URL: http://codereview.chromium.org/2848041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51971 0039d316-1c4b-4281-b951-d872f2087c98
* Implement KDE ReversedException setting in Chromedavidben@chromium.org2010-06-141-12/+16
| | | | | | | | | | R=wtc,eroman BUG=45199 TEST=Added unit tests, can also verify with steps in bug report Review URL: http://codereview.chromium.org/2725009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49701 0039d316-1c4b-4281-b951-d872f2087c98
* Use KDEHOME variable instead of KDE_HOME for locating KDE directorydavidben@chromium.org2010-06-121-3/+3
| | | | | | | | | | | | KDE uses the former, not the latter. R=mdm,wtc BUG=none TEST=unit tests updated, change KDE proxy settings with custom KDEHOME and verify Chrome picks it up Review URL: http://codereview.chromium.org/2779015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49620 0039d316-1c4b-4281-b951-d872f2087c98
* A couple of style mods in proxy_config_service_linux.ccziadh@chromium.org2010-06-111-11/+11
| | | | | | | | | | | Relates to argument passing and iterating over an STL container. r=eroman Review URL: http://codereview.chromium.org/2735012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49478 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: check the timestamps of .kde and .kde4 to figure out which to use for ↵mdm@chromium.org2010-06-101-6/+20
| | | | | | | | | | proxy configuration in KDE. BUG=none TEST=under KDE4, if you have both .kde and .kde4, the one with a newer config directory within will be used Review URL: http://codereview.chromium.org/2729014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49459 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix kde no_proxy environment variable handling.mattm@chromium.org2010-05-181-17/+34
| | | | | | | | | BUG=43176 TEST=net_unittests, manual Review URL: http://codereview.chromium.org/2115006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47592 0039d316-1c4b-4281-b951-d872f2087c98
* bsd: refactor XDG bits of linux_util into a shared file.evan@chromium.org2010-04-221-1/+1
| | | | | | | | | This allows the shared code to build on the BSDs without them needing to build _linux files. Review URL: http://codereview.chromium.org/1701005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45380 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: correctly ignore KDE "indirect" environment variable proxy settings ↵mdm@chromium.org2010-04-181-0/+2
| | | | | | | | | | when they are unset BUG=41095 TEST=configure KDE to use proxy settings from unset environment variables, it should not try to use the variable names as proxies Review URL: http://codereview.chromium.org/1518036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44892 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Use .kde4 for proxy settings when it is present and we are running ↵mdm@chromium.org2010-04-081-9/+38
| | | | | | | | | | under KDE4. Fall back to .kde if it is not present. Also, always respect $KDE_HOME if it is set. BUG=29927 TEST=configure a proxy on a distribution that uses .kde4 (most), we should detect it now Review URL: http://codereview.chromium.org/1524018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43969 0039d316-1c4b-4281-b951-d872f2087c98
* Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h and ↵thestig@chromium.org2010-04-031-16/+16
| | | | | | | | | | rename it EnvVarGetter. Label base::SysInfo::{Get,Has}EnvVar as deprecated. BUG=none TEST=none Review URL: http://codereview.chromium.org/1606007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43559 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Turn on the GTK+ integration by default.erg@chromium.org2010-03-261-0/+1
| | | | | | | | | | | | | | This will regress default startup time for users by 50ms. This doesn't matter because this is what the users want--I've lost count of the number bloggers, people on twitter, and people in our IRC channel complaining about the lack of GTK+ integration...when it's just not on by default. BUG=none TEST=none Review URL: http://codereview.chromium.org/1442001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42804 0039d316-1c4b-4281-b951-d872f2087c98
* Use CHECK_* in netwillchan@chromium.org2010-03-021-2/+2
| | | | | | Review URL: http://codereview.chromium.org/660404 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40453 0039d316-1c4b-4281-b951-d872f2087c98
* ProxyConfig behaved like a struct, but was defined as a class.eroman@chromium.org2010-02-241-27/+29
| | | | | | | | | 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-3/+11
| | | | | | | | | | | | | | 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
* Eliminate all uses of strerror() in code that uses src/base. strerror() is ↵tschmelcher@chromium.org2009-10-131-4/+3
| | | | | | | | | | | inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror(). TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers BUG=none Review URL: http://codereview.chromium.org/261055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix a data race in a proxy config service unit test.mdm@chromium.org2009-09-221-6/+0
| | | | | | | | | BUG=21474 TEST=none Review URL: http://codereview.chromium.org/214036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26833 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: improve KDE proxy settings parsing and add unit tests for it.mdm@chromium.org2009-09-031-22/+34
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/176056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25320 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: get GNOME or KDE proxy settings.mdm@chromium.org2009-08-281-84/+544
| | | | | | | | | 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
* Linux: make the "change proxy settings" button able to start several proxy ↵mdm@chromium.org2009-08-201-1/+2
| | | | | | | | | | | | config utilities. Currently it still only ever starts gnome-network-properties but it is now easy to update. BUG=none TEST=none Review URL: http://codereview.chromium.org/174106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23910 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly update gconf proxy settings on Linux.mdm@chromium.org2009-08-131-1/+3
| | | | | | | | | BUG=19229 TEST=set gnome proxy settings, start chromium, change proxy settings, change proxy settings *back*, see that they correctly update in chromium Review URL: http://codereview.chromium.org/164497 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23346 0039d316-1c4b-4281-b951-d872f2087c98
* linux: generalize desktop environment guessing to encompass KDEevan@chromium.org2009-07-231-31/+38
| | | | | | | | BUG=17363 Review URL: http://codereview.chromium.org/159297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21455 0039d316-1c4b-4281-b951-d872f2087c98
* Try again: Add proxy config (using gnome-network-preferences)mattm@chromium.org2009-07-221-40/+4
| | | | | | | | | BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch.  If gnome isn't installed or running, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/155792 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21246 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add proxy config (using gnome-network-preferences)"mattm@chromium.org2009-07-181-2/+7
| | | | | | | | This reverts commit d06bc0c855b1e81e36c7bfc9bef342eb358d99a5. TBR=estade git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21033 0039d316-1c4b-4281-b951-d872f2087c98
* Add proxy config (using gnome-network-preferences)mattm@chromium.org2009-07-171-7/+2
| | | | | | | | | BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch. If gnome isn't installed, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/149785 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21023 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the log error message about proxy authentication insdoyon@chromium.org2009-07-151-4/+10
| | | | | | | | | | | | | ProxyConfigServiceLinux: the proxy auth parameters are still not supported, but proxy auth is supported. Also see http://crbug.com/16709 BUG=13530 TEST=none Review URL: http://codereview.chromium.org/149614 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20725 0039d316-1c4b-4281-b951-d872f2087c98
* Whenever proxy configurations contain socks and http/https/ftp proxies, ↵arindam@chromium.org2009-07-141-2/+5
| | | | | | | | | | | | socks configuration over rid the other proxies. Fixes the issue. Attached test cases. BUG=15738 TEST=unittest (ProxyConfigTest.ParseProxyRules, ProxyServiceTest.DefaultProxyFallbackToSOCKS) Review URL: http://codereview.chromium.org/149191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20605 0039d316-1c4b-4281-b951-d872f2087c98
* Relax assertion in ProxyConfigServiceLinux gconf cleanup.sdoyon@chromium.org2009-07-131-2/+18
| | | | | | | | | | | | | | | To wind down gconf, a cleanup task is posted to the UI thread. Don't assert if that task is destroyed without being run (as may happen on program exit). BUG=16076 TEST=Run "sh tools/valgrind/chrome_tests.sh -t ui", look af the first couple tests and check we don't get this assertion: "proxy/proxy_config_service_linux.cc(211)] Check failed: !client_." Review URL: http://codereview.chromium.org/155363 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20487 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gconf for the linux proxy config service.sdoyon@chromium.org2009-05-221-83/+250
| | | | | | | | | | | | | | | | | | | | | | | | -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
* Making command-line specified proxy settings more flexible - allowing for ↵robertshield@google.com2009-05-121-66/+1
| | | | | | | | | | 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-061-0/+3
| | | | | | | | | | | | | 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
* linux: obey proxy environment variables in preference to gconfevan@chromium.org2009-05-041-1/+1
| | | | | | | | | | | 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
* ProxyConfigService for Linux.sdoyon@chromium.org2009-04-201-0/+556
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