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

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

Issue 105823009: Revert 239280 "Move more file_util functions to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 if (auto_no_pac_) { 1164 if (auto_no_pac_) {
1165 // Remove the PAC URL; we're not supposed to use it. 1165 // Remove the PAC URL; we're not supposed to use it.
1166 string_table_.erase(PROXY_AUTOCONF_URL); 1166 string_table_.erase(PROXY_AUTOCONF_URL);
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 // Reads kioslaverc one line at a time and calls AddKDESetting() to add 1170 // Reads kioslaverc one line at a time and calls AddKDESetting() to add
1171 // each relevant name-value pair to the appropriate value table. 1171 // each relevant name-value pair to the appropriate value table.
1172 void UpdateCachedSettings() { 1172 void UpdateCachedSettings() {
1173 base::FilePath kioslaverc = kde_config_dir_.Append("kioslaverc"); 1173 base::FilePath kioslaverc = kde_config_dir_.Append("kioslaverc");
1174 file_util::ScopedFILE input(base::OpenFile(kioslaverc, "r")); 1174 file_util::ScopedFILE input(file_util::OpenFile(kioslaverc, "r"));
1175 if (!input.get()) 1175 if (!input.get())
1176 return; 1176 return;
1177 ResetCachedSettings(); 1177 ResetCachedSettings();
1178 bool in_proxy_settings = false; 1178 bool in_proxy_settings = false;
1179 bool line_too_long = false; 1179 bool line_too_long = false;
1180 char line[BUFFER_SIZE]; 1180 char line[BUFFER_SIZE];
1181 // fgets() will return NULL on EOF or error. 1181 // fgets() will return NULL on EOF or error.
1182 while (fgets(line, sizeof(line), input.get())) { 1182 while (fgets(line, sizeof(line), input.get())) {
1183 // fgets() guarantees the line will be properly terminated. 1183 // fgets() guarantees the line will be properly terminated.
1184 size_t length = strlen(line); 1184 size_t length = strlen(line);
(...skipping 572 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 | « trunk/src/net/disk_cache/cache_util_unittest.cc ('k') | trunk/src/net/tools/dump_cache/cache_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698