electron/patches/common/chromium/proxy_config_monitor.patch
Robo 434a6e3561 refactor: create request context from network context (#14656)
* [ci skip] refactor: create request context from network context

* [ci skip] refactor: subscribe to mojo cookiemanager for cookie changes

* [ci skip] refactor: manage the lifetime of custom URLRequestJobFactory

* refactor: use OOP mojo proxy resolver

* revert: add support for kIgnoreCertificateErrorsSPKIList

* build: provide service manifest overlays for content services

* chore: gn format

* fix: log-net-log switch not working as expected

* spec: verify proxy settings are respected from pac script with session.setProxy

* chore: use chrome constants where possible

* fix: initialize request context for global cert fetcher

* refactor: fix destruction of request context getters

* spec: use custom session for proxy tests

* fix: queue up additional stop callbacks while net log is being stopped

* fix: Add CHECK for cookie manager retrieval

* chore: add helper to retrieve logging state for net log module

* fix: ui::ResourceBundle::GetRawDataResourceForScale => GetRawDataResource

* style: comment unused parameters

* build: move //components/certificate_transparency deps from //brightray

* chore: update gritsettings_resource_ids patch

* chore: update api for chromium 68

* fix: net log instance is now a property of session
2018-10-04 13:08:56 -05:00

84 lines
3.2 KiB
Diff

diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc
index 90a8b0895f10..26c1bc0e5859 100644
--- a/chrome/browser/net/proxy_config_monitor.cc
+++ b/chrome/browser/net/proxy_config_monitor.cc
@@ -5,9 +5,13 @@
#include "chrome/browser/net/proxy_config_monitor.h"
#include "build/build_config.h"
+#if 0
#include "chrome/browser/browser_process.h"
+#endif
#include "chrome/browser/net/proxy_service_factory.h"
+#if 0
#include "chrome/browser/profiles/profile.h"
+#endif
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
@@ -15,7 +19,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#endif // defined(OS_CHROMEOS)
-
+#if 0
ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(profile);
@@ -41,14 +45,13 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
proxy_config_service_->AddObserver(this);
}
+#endif
-ProxyConfigMonitor::ProxyConfigMonitor() {
+ProxyConfigMonitor::ProxyConfigMonitor(PrefService* local_prefs) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
pref_proxy_config_tracker_.reset(
ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
- g_browser_process->local_state()));
-
+ local_prefs));
proxy_config_service_ = ProxyServiceFactory::CreateProxyConfigService(
pref_proxy_config_tracker_.get());
diff --git a/chrome/browser/net/proxy_config_monitor.h b/chrome/browser/net/proxy_config_monitor.h
index b783ab18d2d7..4475b58756db 100644
--- a/chrome/browser/net/proxy_config_monitor.h
+++ b/chrome/browser/net/proxy_config_monitor.h
@@ -20,22 +20,24 @@ class ProxyConfigWithAnnotation;
class Profile;
class PrefProxyConfigTracker;
+class PrefService;
// Tracks the ProxyConfig to use, and passes any updates to a NetworkContext's
// ProxyConfigClient.
class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
public network::mojom::ProxyConfigPollerClient {
public:
+#if 0
// Creates a ProxyConfigMonitor that gets proxy settings from |profile| and
// watches for changes. The created ProxyConfigMonitor must be destroyed
// before |profile|.
explicit ProxyConfigMonitor(Profile* profile);
-
+#endif
// Creates a ProxyConfigMonitor that gets proxy settings from the
// BrowserProcess's |local_state_|, for use with NetworkContexts not
// assocaited with a profile. Must be destroyed before the BrowserProcess's
// |local_state_|.
- ProxyConfigMonitor();
+ explicit ProxyConfigMonitor(PrefService* local_prefs);
~ProxyConfigMonitor() override;
@@ -63,7 +65,6 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
// Monitors global and Profile prefs related to proxy configuration.
std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
-
mojo::BindingSet<network::mojom::ProxyConfigPollerClient> binding_set_;
mojo::InterfacePtrSet<network::mojom::ProxyConfigClient>