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

Issue 5005002: Dynamically refresh pref-configured proxies. (Closed)

Created:
10 years, 1 month ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, ben+cc_chromium.org, Paweł Hajdan Jr., gfeher
Visibility:
Public.

Description

Dynamically refresh pref-configured proxies. BUG=63175, 48930 TEST=unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67261

Patch Set 1 #

Patch Set 2 : Implement tests. #

Total comments: 6

Patch Set 3 : Update comments. #

Patch Set 4 : Address comments. #

Total comments: 18

Patch Set 5 : Address Eric's feedback. #

Total comments: 41

Patch Set 6 : Address comments, rebase. #

Patch Set 7 : Remove the tracker object from the profile. #

Patch Set 8 : Fix unit tests. #

Patch Set 9 : Make sure the tracker gets deleted on the UI thread. #

Patch Set 10 : Back to variant that avoids DeleteOnUIThread, make TestingProfile return a real tracker. #

Total comments: 16

Patch Set 11 : Address Jochen's comments. #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+814 lines, -268 lines) Patch
M chrome/app/policy/policy_templates.json View 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 2 comments Download
M chrome/browser/net/chrome_url_request_context.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -76 lines 0 comments Download
D chrome/browser/net/chrome_url_request_context_unittest.cc View 2 3 4 5 1 chunk +0 lines, -181 lines 0 comments Download
A chrome/browser/net/pref_proxy_config_service.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +127 lines, -0 lines 4 comments Download
A chrome/browser/net/pref_proxy_config_service.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +222 lines, -0 lines 2 comments Download
A chrome/browser/net/pref_proxy_config_service_unittest.cc View 2 3 4 5 6 7 8 9 10 1 chunk +384 lines, -0 lines 0 comments Download
M chrome/browser/profile.h View 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profile.cc View 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/profile_impl.h View 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/profile_impl.cc View 5 6 10 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/testing_profile.h View 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.cc View 10 5 chunks +30 lines, -1 line 2 comments Download

Messages

Total messages: 17 (0 generated)
Mattias Nissler (ping if slow)
Please review.
10 years, 1 month ago (2010-11-16 22:40:35 UTC) #1
Mattias Nissler (ping if slow)
Please review.
10 years, 1 month ago (2010-11-16 22:40:35 UTC) #2
jochen (gone - plz use gerrit)
http://codereview.chromium.org/5005002/diff/2001/chrome/browser/net/pref_proxy_config_service.cc File chrome/browser/net/pref_proxy_config_service.cc (right): http://codereview.chromium.org/5005002/diff/2001/chrome/browser/net/pref_proxy_config_service.cc#newcode22 chrome/browser/net/pref_proxy_config_service.cc:22: BrowserThread::DeleteOnUIThread>, make sure to run this on the valgrind ...
10 years, 1 month ago (2010-11-16 22:48:32 UTC) #3
Mattias Nissler (ping if slow)
Adressed Jochen's comments. New version is up. http://codereview.chromium.org/5005002/diff/2001/chrome/browser/net/pref_proxy_config_service.cc File chrome/browser/net/pref_proxy_config_service.cc (right): http://codereview.chromium.org/5005002/diff/2001/chrome/browser/net/pref_proxy_config_service.cc#newcode22 chrome/browser/net/pref_proxy_config_service.cc:22: BrowserThread::DeleteOnUIThread>, On ...
10 years, 1 month ago (2010-11-16 22:58:10 UTC) #4
eroman
Overall approach looks good, however I have comments about the specific implementation. http://codereview.chromium.org/5005002/diff/15001/chrome/browser/net/chrome_url_request_context.cc File chrome/browser/net/chrome_url_request_context.cc ...
10 years, 1 month ago (2010-11-17 02:14:49 UTC) #5
Mattias Nissler (ping if slow)
Thanks Eric for your feedback! I addressed all comments and uploaded a new version. Please ...
10 years, 1 month ago (2010-11-17 12:55:37 UTC) #6
eroman
BTW: I am out of office (vacation) yesterday and today, I will do next review ...
10 years, 1 month ago (2010-11-18 18:09:42 UTC) #7
Mattias Nissler (ping if slow)
On Thu, Nov 18, 2010 at 7:09 PM, <eroman@chromium.org> wrote: > BTW: I am out ...
10 years, 1 month ago (2010-11-18 18:39:03 UTC) #8
eroman
This looks good, however I would like to give it one more pass after the ...
10 years, 1 month ago (2010-11-20 03:19:07 UTC) #9
Mattias Nissler (ping if slow)
Thanks for the feedback. I just uploaded an update version that addresses the comments. http://codereview.chromium.org/5005002/diff/21001/chrome/browser/net/pref_proxy_config_service.cc ...
10 years, 1 month ago (2010-11-21 22:49:13 UTC) #10
Mattias Nissler (ping if slow)
I thought about the tracker getter in the profile a bit more and figured it'd ...
10 years, 1 month ago (2010-11-22 16:01:54 UTC) #11
Mattias Nissler (ping if slow)
eroman: ping?
10 years, 1 month ago (2010-11-23 18:38:47 UTC) #12
Mattias Nissler (ping if slow)
Latest version reverts to the version that doesn't need DeleteOnUIThread. I also put a proper ...
10 years, 1 month ago (2010-11-24 09:44:47 UTC) #13
jochen (gone - plz use gerrit)
LGTM assuming you address my comments and try & valgrind bots are happy with it ...
10 years, 1 month ago (2010-11-24 10:04:52 UTC) #14
Mattias Nissler (ping if slow)
New version with Jochen's comments addressed is up. Now running through trybots (including valgrind), will ...
10 years, 1 month ago (2010-11-24 11:19:29 UTC) #15
eroman
LGTM. Sorry I didn't get to the final pass before leaving on vacation! I realize ...
10 years ago (2010-11-30 02:58:54 UTC) #16
battre (please use the other)
10 years ago (2010-12-02 18:06:12 UTC) #17
I addressed the issues Eric raised in http://codereview.chromium.org/5537002/

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/chrome_u...
File chrome/browser/net/chrome_url_request_context.h (right):

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/chrome_u...
chrome/browser/net/chrome_url_request_context.h:38: class ProxyConfig;
On 2010/11/30 02:58:54, eroman wrote:
> Please delete this as it is no longer referenced.

Done.

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/pref_pro...
File chrome/browser/net/pref_proxy_config_service.cc (right):

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/pref_pro...
chrome/browser/net/pref_proxy_config_service.cc:73: if (valid_ != valid ||
!pref_config_.Equals(config)) {
On 2010/11/30 02:58:54, eroman wrote:
> This is a little weird in the case where (!valid_ && !valid). 
> 
> It probably doesn't make sense to compare pref_config_ to config in this case
> (since by definition it "isn't valid").
> 
> It looks like it is still correct because config is reset to
net::ProxyConfig()
> by ReadPrefConfig in this case, but that isn't immediately obvious.

Done.

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/pref_pro...
File chrome/browser/net/pref_proxy_config_service.h (right):

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/pref_pro...
chrome/browser/net/pref_proxy_config_service.h:29: class ObserverInterface {
On 2010/11/30 02:58:54, eroman wrote:
> nit: why not call this "Observer", which is more typical naming in Chrome.

Done.

http://codereview.chromium.org/5005002/diff/80001/chrome/browser/net/pref_pro...
chrome/browser/net/pref_proxy_config_service.h:71: // (expect for construction).
On 2010/11/30 02:58:54, eroman wrote:
> typo: "expect" --> "except".

Done.

http://codereview.chromium.org/5005002/diff/80001/chrome/test/testing_profile.cc
File chrome/test/testing_profile.cc (right):

http://codereview.chromium.org/5005002/diff/80001/chrome/test/testing_profile...
chrome/test/testing_profile.cc:120: class TestURLRequestContextGetter : public
URLRequestContextGetter {
On 2010/11/30 02:58:54, eroman wrote:
> What is this used for? (I don't see it referenced in here).

Line 427, see below.

Powered by Google App Engine
This is Rietveld 408576698