Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Issue 6549007: Make CrOS proxy configuration write prefs directly. (Closed)

Created:
9 years, 10 months ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
Reviewers:
danno, kuan, battre
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, nkostylev+cc_chromium.org, davemoore+watch_chromium.org, Paweł Hajdan Jr., Denis Lagno, zel
Visibility:
Public.

Description

Make CrOS proxy configuration write prefs directly. Change the CrOS ProxyConfigServiceImpl code to write to local state prefs instead of implementing ProxyConfigService. This has the advantage of getting recommended policy to work out of the box and also lets us reuse the IO thread switching dance from PrefProxyConfigService. BUG=chromium-os:11262, chromium-os:11530 TEST=compiles and passes tests, recommended proxy policy is honored by in CrOS

Patch Set 1 #

Patch Set 2 : Fix unit test. #

Patch Set 3 : Fix single proxy handling. #

Patch Set 4 : Fix single proxy handling for real! #

Total comments: 16

Patch Set 5 : Address comments. #

Patch Set 6 : Remove default request context proxy config service patch. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+372 lines, -375 lines) Patch
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 5 2 chunks +0 lines, -23 lines 0 comments Download
D chrome/browser/chromeos/proxy_config_service.h View 1 chunk +0 lines, -42 lines 0 comments Download
M chrome/browser/chromeos/proxy_config_service_impl.h View 1 2 3 4 7 chunks +27 lines, -59 lines 2 comments Download
M chrome/browser/chromeos/proxy_config_service_impl.cc View 1 2 3 12 chunks +66 lines, -110 lines 0 comments Download
M chrome/browser/chromeos/proxy_config_service_impl_unittest.cc View 21 chunks +91 lines, -99 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/net/pref_proxy_config_service.h View 2 chunks +13 lines, -1 line 2 comments Download
M chrome/browser/net/pref_proxy_config_service.cc View 1 2 3 4 8 chunks +51 lines, -8 lines 0 comments Download
M chrome/browser/net/pref_proxy_config_service_unittest.cc View 1 8 chunks +82 lines, -10 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 3 chunks +3 lines, -7 lines 2 comments Download
M chrome/chrome_browser.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/testing_profile.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M net/proxy/proxy_bypass_rules.h View 2 chunks +5 lines, -1 line 0 comments Download
M net/proxy/proxy_bypass_rules.cc View 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Mattias Nissler (ping if slow)
Please review: kuan for the CrOS proxy service modifications, danno for the pref-related part. Others ...
9 years, 10 months ago (2011-02-21 18:12:57 UTC) #1
danno
I like it, seem to clean things up considerably. a few questions... http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/login/login_utils.cc File chrome/browser/chromeos/login/login_utils.cc ...
9 years, 10 months ago (2011-02-21 21:45:20 UTC) #2
Mattias Nissler (ping if slow)
Answer Danno's comments. http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/login/login_utils.cc File chrome/browser/chromeos/login/login_utils.cc (right): http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/login/login_utils.cc#newcode241 chrome/browser/chromeos/login/login_utils.cc:241: #if 0 On 2011/02/21 21:45:20, danno ...
9 years, 10 months ago (2011-02-22 09:45:34 UTC) #3
battre
A few minor comments. http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/proxy_config_service_impl.cc File chrome/browser/chromeos/proxy_config_service_impl.cc (right): http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/proxy_config_service_impl.cc#newcode453 chrome/browser/chromeos/proxy_config_service_impl.cc:453: void ProxyConfigServiceImpl::UIGetProxyConfig(ProxyConfig* config) { Any ...
9 years, 10 months ago (2011-02-22 10:32:40 UTC) #4
Mattias Nissler (ping if slow)
Answer comments. http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/proxy_config_service_impl.cc File chrome/browser/chromeos/proxy_config_service_impl.cc (right): http://codereview.chromium.org/6549007/diff/3001/chrome/browser/chromeos/proxy_config_service_impl.cc#newcode453 chrome/browser/chromeos/proxy_config_service_impl.cc:453: void ProxyConfigServiceImpl::UIGetProxyConfig(ProxyConfig* config) { On 2011/02/22 10:32:40, ...
9 years, 10 months ago (2011-02-22 11:08:02 UTC) #5
kuan
http://codereview.chromium.org/6549007/diff/4020/chrome/browser/chromeos/proxy_config_service_impl.h File chrome/browser/chromeos/proxy_config_service_impl.h (right): http://codereview.chromium.org/6549007/diff/4020/chrome/browser/chromeos/proxy_config_service_impl.h#newcode38 chrome/browser/chromeos/proxy_config_service_impl.h:38: // Profile::GetChromeOSProxyConfigServiceImpl. It is accessed from i'm sure u're ...
9 years, 10 months ago (2011-02-22 22:20:25 UTC) #6
Mattias Nissler (ping if slow)
9 years, 9 months ago (2011-03-01 15:19:20 UTC) #7
Here's my answers for the record. Note that for various reasons (mostly
initialization order), I'll probably go for a different approach, which is in
http://codereview.chromium.org/6597070/, so closing this issue.

http://codereview.chromium.org/6549007/diff/4020/chrome/browser/chromeos/prox...
File chrome/browser/chromeos/proxy_config_service_impl.h (right):

http://codereview.chromium.org/6549007/diff/4020/chrome/browser/chromeos/prox...
chrome/browser/chromeos/proxy_config_service_impl.h:38: //
Profile::GetChromeOSProxyConfigServiceImpl. It is accessed from
On 2011/02/22 22:20:25, kuan wrote:
> i'm sure u're aware of battre's cl that places ProxyConfigServiceImpl in
browser
> process, so this comment will need to change after.

Yes, he's actually sitting 2 desks away from me, and we've already synced.

http://codereview.chromium.org/6549007/diff/4020/chrome/browser/net/pref_prox...
File chrome/browser/net/pref_proxy_config_service.h (right):

http://codereview.chromium.org/6549007/diff/4020/chrome/browser/net/pref_prox...
chrome/browser/net/pref_proxy_config_service.h:91: // A fallback PrefSerice that
is checked for user preferences if
On 2011/02/22 22:20:25, kuan wrote:
> nit: typo: PrefService

Done.

http://codereview.chromium.org/6549007/diff/4020/chrome/browser/profiles/prof...
File chrome/browser/profiles/profile_io_data.cc (right):

http://codereview.chromium.org/6549007/diff/4020/chrome/browser/profiles/prof...
chrome/browser/profiles/profile_io_data.cc:278: #endif  // defined(OS_CHROMEOS)
On 2011/02/22 22:20:25, kuan wrote:
> chromeos has no base_service? this would mean that the very initial config
used
> for PrefProxyConfigService must be same as that retrieved in
> ProxyCrosSettingsProvider::GetConfigService.  the former uses net::ProxyConfig
> in the prefs, whose default is DIRECT connection, but the latter uses
> AUTO_DETECT for default.  will this cause the ui and backend to differ? 
> 
> nit: if it turns out i'm wrong, the comment "// defined" shld be "// !defined"

It's intentional that ChromeOS now doesn't have base service any longer, since
it'll feed the configuration directly via local_state prefs.

That wrong default in PrefProxyConfigService was really a mistake on my side, I
originally intended to put the gold default, which is auto configuration.

Powered by Google App Engine
This is Rietveld 408576698