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

Unified Diff: net/proxy/proxy_service.h

Issue 2802015: Massively simplify the NetworkChangeNotifier infrastructure:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/proxy/proxy_service.h
===================================================================
--- net/proxy/proxy_service.h (revision 50775)
+++ net/proxy/proxy_service.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,13 +36,10 @@
public NetworkChangeNotifier::Observer {
public:
// The instance takes ownership of |config_service| and |resolver|.
- // If |network_change_notifier| is non-NULL, the proxy service will register
- // with it to detect when the network setup has changed. This is used to
- // decide when to re-configure the proxy discovery.
// |net_log| is a possibly NULL destination to send log events to. It must
// remain alive for the lifetime of this ProxyService.
- ProxyService(ProxyConfigService* config_service, ProxyResolver* resolver,
- NetworkChangeNotifier* network_change_notifier,
+ ProxyService(ProxyConfigService* config_service,
+ ProxyResolver* resolver,
NetLog* net_log);
// Used internally to handle PAC queries.
@@ -143,8 +140,6 @@
// |url_request_context| is only used when use_v8_resolver is true:
// it specifies the URL request context that will be used if a PAC
// script needs to be fetched.
- // |network_change_notifier| may be NULL. Otherwise it will be used to
- // signal the ProxyService when the network setup has changed.
// |io_loop| points to the IO thread's message loop. It is only used
// when pc is NULL.
// ##########################################################################
@@ -156,7 +151,6 @@
ProxyConfigService* proxy_config_service,
bool use_v8_resolver,
URLRequestContext* url_request_context,
- NetworkChangeNotifier* network_change_notifier,
NetLog* net_log,
MessageLoop* io_loop);
@@ -244,7 +238,8 @@
int result_code,
const BoundNetLog& net_log);
- // NetworkChangeNotifier::Observer methods:
+ // NetworkChangeNotifier::Observer
+ // When this is called, we re-fetch PAC scripts and re-run WPAD.
virtual void OnIPAddressChanged();
scoped_ptr<ProxyConfigService> config_service_;
@@ -287,10 +282,6 @@
// sent to.
NetLog* net_log_;
- // The (possibly NULL) network change notifier that we use to decide when
- // to refetch PAC scripts or re-run WPAD.
- NetworkChangeNotifier* const network_change_notifier_;
-
DISALLOW_COPY_AND_ASSIGN(ProxyService);
};
@@ -301,9 +292,12 @@
SyncProxyServiceHelper(MessageLoop* io_message_loop,
ProxyService* proxy_service);
- int ResolveProxy(const GURL& url, ProxyInfo* proxy_info, const BoundNetLog& net_log);
+ int ResolveProxy(const GURL& url,
+ ProxyInfo* proxy_info,
+ const BoundNetLog& net_log);
int ReconsiderProxyAfterError(const GURL& url,
- ProxyInfo* proxy_info, const BoundNetLog& net_log);
+ ProxyInfo* proxy_info,
+ const BoundNetLog& net_log);
private:
friend class base::RefCountedThreadSafe<SyncProxyServiceHelper>;

Powered by Google App Engine
This is Rietveld 408576698