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

Issue 525104: Adds a NetworkChangeNotifier dependency to ProxyService; when we observer a n... (Closed)

Created:
10 years, 11 months ago by eroman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Adds a NetworkChangeNotifier dependency to ProxyService; when we observer a 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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35772

Patch Set 1 #

Patch Set 2 : Fix some comments #

Total comments: 2

Patch Set 3 : Add a test_shell file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -54 lines) Patch
M chrome/browser/net/chrome_url_request_context.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/net/resolve_proxy_msg_helper_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M net/proxy/proxy_service.h View 1 6 chunks +18 lines, -2 lines 0 comments Download
M net/proxy/proxy_service.cc View 6 chunks +28 lines, -5 lines 0 comments Download
M net/proxy/proxy_service_unittest.cc View 45 chunks +144 lines, -43 lines 0 comments Download
M webkit/tools/test_shell/test_shell_request_context.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
eroman
10 years, 11 months ago (2010-01-08 00:30:15 UTC) #1
willchan no longer on Chromium
LGTM http://codereview.chromium.org/525104/diff/12/14 File net/proxy/proxy_service.h (right): http://codereview.chromium.org/525104/diff/12/14#newcode251 net/proxy/proxy_service.h:251: virtual void OnIPAddressChanged(); Shouldn't this be in the ...
10 years, 11 months ago (2010-01-08 02:42:02 UTC) #2
eroman
10 years, 11 months ago (2010-01-08 03:26:33 UTC) #3
http://codereview.chromium.org/525104/diff/12/14
File net/proxy/proxy_service.h (right):

http://codereview.chromium.org/525104/diff/12/14#newcode251
net/proxy/proxy_service.h:251: virtual void OnIPAddressChanged();
On 2010/01/08 02:42:02, willchan wrote:
> Shouldn't this be in the public section?

I did a random sampling of other chrome codes, and found they favored putting
such implementation in the private section.

I like that style, since it helps conceal the implementation details a bit
(caller would need to cast to gain access to it).

Here are the samples I consulted (implementors of NotificationObserver):

  chrome/browser/autocomplete/autocomplete_popup_model.h
  chrome/browser/browsing_data_remover.h
  chrome/browser/extensions/user_script_listener.h

My sampling also included a counter example, so I guess our code uses both
styles:

  chrome/browser/cocoa/browser_window_cocoa.h

Powered by Google App Engine
This is Rietveld 408576698