| 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 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
| 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Requests notification of gconf/gsettings changes for proxy | 62 // Requests notification of gconf/gsettings changes for proxy |
| 63 // settings. Returns true on success. | 63 // settings. Returns true on success. |
| 64 virtual bool SetUpNotifications(Delegate* delegate) = 0; | 64 virtual bool SetUpNotifications(Delegate* delegate) = 0; |
| 65 | 65 |
| 66 // Returns the message loop for the thread on which this object | 66 // Returns the message loop for the thread on which this object |
| 67 // handles notifications, and also on which it must be destroyed. | 67 // handles notifications, and also on which it must be destroyed. |
| 68 // Returns NULL if it does not matter. | 68 // Returns NULL if it does not matter. |
| 69 virtual base::SingleThreadTaskRunner* GetNotificationTaskRunner() = 0; | 69 virtual base::SingleThreadTaskRunner* GetNotificationTaskRunner() = 0; |
| 70 | 70 |
| 71 // Returns the data source's name (e.g. "gconf", "gsettings", "KDE", | 71 // Returns the source of proxy settings. |
| 72 // "test"). Used only for diagnostic purposes (e.g. VLOG(1) etc.). | 72 virtual ProxyConfigSource GetConfigSource() = 0; |
| 73 virtual const char* GetDataSource() = 0; | |
| 74 | 73 |
| 75 // These are all the values that can be fetched. We used to just use the | 74 // These are all the values that can be fetched. We used to just use the |
| 76 // corresponding paths in gconf for these, but gconf is now obsolete and | 75 // corresponding paths in gconf for these, but gconf is now obsolete and |
| 77 // in the future we'll be using mostly gsettings/kioslaverc so we | 76 // in the future we'll be using mostly gsettings/kioslaverc so we |
| 78 // enumerate them instead to avoid unnecessary string operations. | 77 // enumerate them instead to avoid unnecessary string operations. |
| 79 enum StringSetting { | 78 enum StringSetting { |
| 80 PROXY_MODE, | 79 PROXY_MODE, |
| 81 PROXY_AUTOCONF_URL, | 80 PROXY_AUTOCONF_URL, |
| 82 PROXY_HTTP_HOST, | 81 PROXY_HTTP_HOST, |
| 83 PROXY_HTTPS_HOST, | 82 PROXY_HTTPS_HOST, |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 301 |
| 303 private: | 302 private: |
| 304 scoped_refptr<Delegate> delegate_; | 303 scoped_refptr<Delegate> delegate_; |
| 305 | 304 |
| 306 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 305 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
| 307 }; | 306 }; |
| 308 | 307 |
| 309 } // namespace net | 308 } // namespace net |
| 310 | 309 |
| 311 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 310 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
| OLD | NEW |