| 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 #include <errno.h> | 7 #include <errno.h> |
| 8 #if defined(USE_GCONF) | 8 #if defined(USE_GCONF) |
| 9 #include <gconf/gconf-client.h> | 9 #include <gconf/gconf-client.h> |
| 10 #endif // defined(USE_GCONF) | 10 #endif // defined(USE_GCONF) |
| (...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 switch (base::nix::GetDesktopEnvironment(env_var_getter_.get())) { | 1541 switch (base::nix::GetDesktopEnvironment(env_var_getter_.get())) { |
| 1542 case base::nix::DESKTOP_ENVIRONMENT_GNOME: | 1542 case base::nix::DESKTOP_ENVIRONMENT_GNOME: |
| 1543 case base::nix::DESKTOP_ENVIRONMENT_UNITY: | 1543 case base::nix::DESKTOP_ENVIRONMENT_UNITY: |
| 1544 #if defined(USE_GIO) | 1544 #if defined(USE_GIO) |
| 1545 { | 1545 { |
| 1546 std::unique_ptr<SettingGetterImplGSettings> gs_getter( | 1546 std::unique_ptr<SettingGetterImplGSettings> gs_getter( |
| 1547 new SettingGetterImplGSettings()); | 1547 new SettingGetterImplGSettings()); |
| 1548 // We have to load symbols and check the GNOME version in use to decide | 1548 // We have to load symbols and check the GNOME version in use to decide |
| 1549 // if we should use the gsettings getter. See LoadAndCheckVersion(). | 1549 // if we should use the gsettings getter. See LoadAndCheckVersion(). |
| 1550 if (gs_getter->LoadAndCheckVersion(env_var_getter_.get())) | 1550 if (gs_getter->LoadAndCheckVersion(env_var_getter_.get())) |
| 1551 setting_getter_.reset(gs_getter.release()); | 1551 setting_getter_ = std::move(gs_getter); |
| 1552 } | 1552 } |
| 1553 #endif | 1553 #endif |
| 1554 #if defined(USE_GCONF) | 1554 #if defined(USE_GCONF) |
| 1555 // Fall back on gconf if gsettings is unavailable or incorrect. | 1555 // Fall back on gconf if gsettings is unavailable or incorrect. |
| 1556 if (!setting_getter_) | 1556 if (!setting_getter_) |
| 1557 setting_getter_.reset(new SettingGetterImplGConf()); | 1557 setting_getter_.reset(new SettingGetterImplGConf()); |
| 1558 #endif | 1558 #endif |
| 1559 break; | 1559 break; |
| 1560 case base::nix::DESKTOP_ENVIRONMENT_KDE3: | 1560 case base::nix::DESKTOP_ENVIRONMENT_KDE3: |
| 1561 case base::nix::DESKTOP_ENVIRONMENT_KDE4: | 1561 case base::nix::DESKTOP_ENVIRONMENT_KDE4: |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { | 1781 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { |
| 1782 delegate_->RemoveObserver(observer); | 1782 delegate_->RemoveObserver(observer); |
| 1783 } | 1783 } |
| 1784 | 1784 |
| 1785 ProxyConfigService::ConfigAvailability | 1785 ProxyConfigService::ConfigAvailability |
| 1786 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { | 1786 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { |
| 1787 return delegate_->GetLatestProxyConfig(config); | 1787 return delegate_->GetLatestProxyConfig(config); |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 } // namespace net | 1790 } // namespace net |
| OLD | NEW |