OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/proxy/proxy_config_service_linux.h" | 5 #include "net/proxy/proxy_config_service_linux.h" |
6 | 6 |
| 7 // glib >=2.40 deprecate g_settings_list_schemas in favor of |
| 8 // g_settings_schema_source_list_schemas. This function is not available on |
| 9 // earlier versions that we still need to support (specifically, 2.32), so |
| 10 // disable the warning. |
| 11 // TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10 |
| 12 // (saucy) and earlier. Update the code to use |
| 13 // g_settings_schema_source_list_schemas instead. |
| 14 #define GLIB_DISABLE_DEPRECATION_WARNINGS |
| 15 |
7 #include <errno.h> | 16 #include <errno.h> |
8 #include <fcntl.h> | 17 #include <fcntl.h> |
9 #if defined(USE_GCONF) | 18 #if defined(USE_GCONF) |
10 #include <gconf/gconf-client.h> | 19 #include <gconf/gconf-client.h> |
11 #endif // defined(USE_GCONF) | 20 #endif // defined(USE_GCONF) |
12 #include <limits.h> | 21 #include <limits.h> |
13 #include <stdio.h> | 22 #include <stdio.h> |
14 #include <stdlib.h> | 23 #include <stdlib.h> |
15 #include <sys/inotify.h> | 24 #include <sys/inotify.h> |
16 #include <unistd.h> | 25 #include <unistd.h> |
(...skipping 15 matching lines...) Expand all Loading... |
32 #include "base/strings/string_util.h" | 41 #include "base/strings/string_util.h" |
33 #include "base/threading/thread_restrictions.h" | 42 #include "base/threading/thread_restrictions.h" |
34 #include "base/timer/timer.h" | 43 #include "base/timer/timer.h" |
35 #include "net/base/net_errors.h" | 44 #include "net/base/net_errors.h" |
36 #include "net/http/http_util.h" | 45 #include "net/http/http_util.h" |
37 #include "net/proxy/proxy_config.h" | 46 #include "net/proxy/proxy_config.h" |
38 #include "net/proxy/proxy_server.h" | 47 #include "net/proxy/proxy_server.h" |
39 #include "url/url_canon.h" | 48 #include "url/url_canon.h" |
40 | 49 |
41 #if defined(USE_GIO) | 50 #if defined(USE_GIO) |
42 #if __clang__ | |
43 #pragma clang diagnostic ignored "-Wdeprecated-declarations" | |
44 #endif | |
45 #include "library_loaders/libgio.h" | 51 #include "library_loaders/libgio.h" |
46 #endif // defined(USE_GIO) | 52 #endif // defined(USE_GIO) |
47 | 53 |
48 namespace net { | 54 namespace net { |
49 | 55 |
50 namespace { | 56 namespace { |
51 | 57 |
52 // Given a proxy hostname from a setting, returns that hostname with | 58 // Given a proxy hostname from a setting, returns that hostname with |
53 // an appropriate proxy server scheme prefix. | 59 // an appropriate proxy server scheme prefix. |
54 // scheme indicates the desired proxy scheme: usually http, with | 60 // scheme indicates the desired proxy scheme: usually http, with |
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { | 1767 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { |
1762 delegate_->RemoveObserver(observer); | 1768 delegate_->RemoveObserver(observer); |
1763 } | 1769 } |
1764 | 1770 |
1765 ProxyConfigService::ConfigAvailability | 1771 ProxyConfigService::ConfigAvailability |
1766 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { | 1772 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { |
1767 return delegate_->GetLatestProxyConfig(config); | 1773 return delegate_->GetLatestProxyConfig(config); |
1768 } | 1774 } |
1769 | 1775 |
1770 } // namespace net | 1776 } // namespace net |
OLD | NEW |