OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" | 5 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "base/prefs/pref_registry_simple.h" | |
13 #include "base/prefs/pref_service.h" | |
14 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
15 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
16 #include "base/values.h" | 14 #include "base/values.h" |
17 #include "components/pref_registry/pref_registry_syncable.h" | 15 #include "components/pref_registry/pref_registry_syncable.h" |
| 16 #include "components/prefs/pref_registry_simple.h" |
| 17 #include "components/prefs/pref_service.h" |
18 #include "components/proxy_config/proxy_config_dictionary.h" | 18 #include "components/proxy_config/proxy_config_dictionary.h" |
19 #include "components/proxy_config/proxy_config_pref_names.h" | 19 #include "components/proxy_config/proxy_config_pref_names.h" |
20 #include "net/proxy/proxy_list.h" | 20 #include "net/proxy/proxy_list.h" |
21 #include "net/proxy/proxy_server.h" | 21 #include "net/proxy/proxy_server.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Determine if |proxy| is of the form "*.googlezip.net". | 26 // Determine if |proxy| is of the form "*.googlezip.net". |
27 bool IsGooglezipDataReductionProxy(const net::ProxyServer& proxy) { | 27 bool IsGooglezipDataReductionProxy(const net::ProxyServer& proxy) { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 (config_state_ != ProxyPrefs::CONFIG_UNSET && | 426 (config_state_ != ProxyPrefs::CONFIG_UNSET && |
427 !pref_config_.Equals(new_config))) { | 427 !pref_config_.Equals(new_config))) { |
428 config_state_ = config_state; | 428 config_state_ = config_state; |
429 if (config_state_ != ProxyPrefs::CONFIG_UNSET) | 429 if (config_state_ != ProxyPrefs::CONFIG_UNSET) |
430 pref_config_ = new_config; | 430 pref_config_ = new_config; |
431 update_pending_ = true; | 431 update_pending_ = true; |
432 } | 432 } |
433 if (update_pending_) | 433 if (update_pending_) |
434 OnProxyConfigChanged(config_state, new_config); | 434 OnProxyConfigChanged(config_state, new_config); |
435 } | 435 } |
OLD | NEW |