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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « net/dns/dns_hosts.cc ('k') | net/proxy/proxy_config_service_linux_unittest.cc » ('j') | 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 } else { 819 } else {
820 // Yes, we're on the UI thread. Yes, we're accessing the file system. 820 // Yes, we're on the UI thread. Yes, we're accessing the file system.
821 // Sadly, we don't have much choice. We need the proxy settings and we 821 // Sadly, we don't have much choice. We need the proxy settings and we
822 // need them now, and to figure out where to get them, we have to check 822 // need them now, and to figure out where to get them, we have to check
823 // for this binary. See http://crbug.com/69057 for additional details. 823 // for this binary. See http://crbug.com/69057 for additional details.
824 base::ThreadRestrictions::ScopedAllowIO allow_io; 824 base::ThreadRestrictions::ScopedAllowIO allow_io;
825 std::vector<std::string> paths; 825 std::vector<std::string> paths;
826 Tokenize(path, ":", &paths); 826 Tokenize(path, ":", &paths);
827 for (size_t i = 0; i < paths.size(); ++i) { 827 for (size_t i = 0; i < paths.size(); ++i) {
828 base::FilePath file(paths[i]); 828 base::FilePath file(paths[i]);
829 if (file_util::PathExists(file.Append("gnome-network-properties"))) { 829 if (base::PathExists(file.Append("gnome-network-properties"))) {
830 VLOG(1) << "Found gnome-network-properties. Will fall back to gconf."; 830 VLOG(1) << "Found gnome-network-properties. Will fall back to gconf.";
831 return false; 831 return false;
832 } 832 }
833 } 833 }
834 } 834 }
835 835
836 VLOG(1) << "All gsettings tests OK. Will get proxy config from gsettings."; 836 VLOG(1) << "All gsettings tests OK. Will get proxy config from gsettings.";
837 return true; 837 return true;
838 } 838 }
839 #endif // defined(USE_GIO) 839 #endif // defined(USE_GIO)
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { 1757 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) {
1758 delegate_->RemoveObserver(observer); 1758 delegate_->RemoveObserver(observer);
1759 } 1759 }
1760 1760
1761 ProxyConfigService::ConfigAvailability 1761 ProxyConfigService::ConfigAvailability
1762 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { 1762 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) {
1763 return delegate_->GetLatestProxyConfig(config); 1763 return delegate_->GetLatestProxyConfig(config);
1764 } 1764 }
1765 1765
1766 } // namespace net 1766 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_hosts.cc ('k') | net/proxy/proxy_config_service_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698