| 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 #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> |
| 11 | 11 |
| 12 #include "base/base_api.h" | 12 #include "base/base_api.h" |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/environment.h" | 14 #include "base/environment.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "net/base/net_api.h" |
| 19 #include "net/proxy/proxy_config.h" | 20 #include "net/proxy/proxy_config.h" |
| 20 #include "net/proxy/proxy_config_service.h" | 21 #include "net/proxy/proxy_config_service.h" |
| 21 #include "net/proxy/proxy_server.h" | 22 #include "net/proxy/proxy_server.h" |
| 22 | 23 |
| 23 namespace net { | 24 namespace net { |
| 24 | 25 |
| 25 // Implementation of ProxyConfigService that retrieves the system proxy | 26 // Implementation of ProxyConfigService that retrieves the system proxy |
| 26 // settings from environment variables, gconf, gsettings, or kioslaverc (KDE). | 27 // settings from environment variables, gconf, gsettings, or kioslaverc (KDE). |
| 27 class BASE_API ProxyConfigServiceLinux : public ProxyConfigService { | 28 class NET_TEST ProxyConfigServiceLinux : public ProxyConfigService { |
| 28 public: | 29 public: |
| 29 | 30 |
| 30 // Forward declaration of Delegate. | 31 // Forward declaration of Delegate. |
| 31 class Delegate; | 32 class Delegate; |
| 32 | 33 |
| 33 class SettingGetter { | 34 class SettingGetter { |
| 34 public: | 35 public: |
| 35 // Buffer size used in some implementations of this class when reading | 36 // Buffer size used in some implementations of this class when reading |
| 36 // files. Defined here so unit tests can construct worst-case inputs. | 37 // files. Defined here so unit tests can construct worst-case inputs. |
| 37 static const size_t BUFFER_SIZE = 512; | 38 static const size_t BUFFER_SIZE = 512; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 294 |
| 294 private: | 295 private: |
| 295 scoped_refptr<Delegate> delegate_; | 296 scoped_refptr<Delegate> delegate_; |
| 296 | 297 |
| 297 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 298 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
| 298 }; | 299 }; |
| 299 | 300 |
| 300 } // namespace net | 301 } // namespace net |
| 301 | 302 |
| 302 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 303 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
| OLD | NEW |