Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Side by Side Diff: net/proxy/proxy_config_service_linux.cc

Issue 10735034: Linux: Detect Unity as a desktop environment. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/linux/audio_manager_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <fcntl.h> 8 #include <fcntl.h>
9 #if defined(USE_GCONF) 9 #if defined(USE_GCONF)
10 #include <gconf/gconf-client.h> 10 #include <gconf/gconf-client.h>
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 setting_getter_->BypassListIsReversed(); 1565 setting_getter_->BypassListIsReversed();
1566 1566
1567 return true; 1567 return true;
1568 } 1568 }
1569 1569
1570 ProxyConfigServiceLinux::Delegate::Delegate(base::Environment* env_var_getter) 1570 ProxyConfigServiceLinux::Delegate::Delegate(base::Environment* env_var_getter)
1571 : env_var_getter_(env_var_getter) { 1571 : env_var_getter_(env_var_getter) {
1572 // Figure out which SettingGetterImpl to use, if any. 1572 // Figure out which SettingGetterImpl to use, if any.
1573 switch (base::nix::GetDesktopEnvironment(env_var_getter)) { 1573 switch (base::nix::GetDesktopEnvironment(env_var_getter)) {
1574 case base::nix::DESKTOP_ENVIRONMENT_GNOME: 1574 case base::nix::DESKTOP_ENVIRONMENT_GNOME:
1575 case base::nix::DESKTOP_ENVIRONMENT_UNITY:
1575 #if defined(USE_GIO) 1576 #if defined(USE_GIO)
1576 { 1577 {
1577 scoped_ptr<SettingGetterImplGSettings> gs_getter( 1578 scoped_ptr<SettingGetterImplGSettings> gs_getter(
1578 new SettingGetterImplGSettings()); 1579 new SettingGetterImplGSettings());
1579 // We have to load symbols and check the GNOME version in use to decide 1580 // We have to load symbols and check the GNOME version in use to decide
1580 // if we should use the gsettings getter. See LoadAndCheckVersion(). 1581 // if we should use the gsettings getter. See LoadAndCheckVersion().
1581 if (gs_getter->LoadAndCheckVersion(env_var_getter)) 1582 if (gs_getter->LoadAndCheckVersion(env_var_getter))
1582 setting_getter_.reset(gs_getter.release()); 1583 setting_getter_.reset(gs_getter.release());
1583 } 1584 }
1584 #endif 1585 #endif
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { 1813 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) {
1813 delegate_->RemoveObserver(observer); 1814 delegate_->RemoveObserver(observer);
1814 } 1815 }
1815 1816
1816 ProxyConfigService::ConfigAvailability 1817 ProxyConfigService::ConfigAvailability
1817 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { 1818 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) {
1818 return delegate_->GetLatestProxyConfig(config); 1819 return delegate_->GetLatestProxyConfig(config);
1819 } 1820 }
1820 1821
1821 } // namespace net 1822 } // namespace net
OLDNEW
« no previous file with comments | « media/audio/linux/audio_manager_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698