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

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

Issue 3347005: Moving file_util::FileInfo to base::PlatformFileInfo, and adding the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <gconf/gconf-client.h> 9 #include <gconf/gconf-client.h>
10 #include <limits.h> 10 #include <limits.h>
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // the gconf version, that is the only thread that can access the proxy 452 // the gconf version, that is the only thread that can access the proxy
453 // settings (a gconf restriction). As noted below, the initial read of 453 // settings (a gconf restriction). As noted below, the initial read of
454 // the proxy settings will be done in this thread anyway, so we check 454 // the proxy settings will be done in this thread anyway, so we check
455 // for .kde4 here in this thread as well. 455 // for .kde4 here in this thread as well.
456 FilePath kde3_path = FilePath(home).Append(".kde"); 456 FilePath kde3_path = FilePath(home).Append(".kde");
457 FilePath kde3_config = KDEHomeToConfigPath(kde3_path); 457 FilePath kde3_config = KDEHomeToConfigPath(kde3_path);
458 FilePath kde4_path = FilePath(home).Append(".kde4"); 458 FilePath kde4_path = FilePath(home).Append(".kde4");
459 FilePath kde4_config = KDEHomeToConfigPath(kde4_path); 459 FilePath kde4_config = KDEHomeToConfigPath(kde4_path);
460 bool use_kde4 = false; 460 bool use_kde4 = false;
461 if (file_util::DirectoryExists(kde4_path)) { 461 if (file_util::DirectoryExists(kde4_path)) {
462 file_util::FileInfo kde3_info; 462 base::PlatformFileInfo kde3_info;
463 file_util::FileInfo kde4_info; 463 base::PlatformFileInfo kde4_info;
464 if (file_util::GetFileInfo(kde4_config, &kde4_info)) { 464 if (file_util::GetFileInfo(kde4_config, &kde4_info)) {
465 if (file_util::GetFileInfo(kde3_config, &kde3_info)) { 465 if (file_util::GetFileInfo(kde3_config, &kde3_info)) {
466 use_kde4 = kde4_info.last_modified >= kde3_info.last_modified; 466 use_kde4 = kde4_info.last_modified >= kde3_info.last_modified;
467 } else { 467 } else {
468 use_kde4 = true; 468 use_kde4 = true;
469 } 469 }
470 } 470 }
471 } 471 }
472 if (use_kde4) { 472 if (use_kde4) {
473 kde_config_dir_ = KDEHomeToConfigPath(kde4_path); 473 kde_config_dir_ = KDEHomeToConfigPath(kde4_path);
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 : delegate_(new Delegate(env_var_getter)) { 1232 : delegate_(new Delegate(env_var_getter)) {
1233 } 1233 }
1234 1234
1235 ProxyConfigServiceLinux::ProxyConfigServiceLinux( 1235 ProxyConfigServiceLinux::ProxyConfigServiceLinux(
1236 base::Environment* env_var_getter, 1236 base::Environment* env_var_getter,
1237 GConfSettingGetter* gconf_getter) 1237 GConfSettingGetter* gconf_getter)
1238 : delegate_(new Delegate(env_var_getter, gconf_getter)) { 1238 : delegate_(new Delegate(env_var_getter, gconf_getter)) {
1239 } 1239 }
1240 1240
1241 } // namespace net 1241 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698