| Index: net/proxy/proxy_config_service_linux.cc
|
| diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
|
| index db65567a3ecb5f10b96a4a6cb6f01bb664dd3b57..d6f89db918dd6019bbf7c63022025cfacbeb551d 100644
|
| --- a/net/proxy/proxy_config_service_linux.cc
|
| +++ b/net/proxy/proxy_config_service_linux.cc
|
| @@ -19,7 +19,6 @@
|
| #include "base/bind.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/debug/leak_annotations.h"
|
| -#include "base/environment.h"
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| #include "base/files/scoped_file.h"
|
| @@ -29,7 +28,6 @@
|
| #include "base/nix/xdg_util.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/strings/string_number_conversions.h"
|
| -#include "base/strings/string_split.h"
|
| #include "base/strings/string_tokenizer.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/threading/thread_restrictions.h"
|
| @@ -834,23 +832,15 @@ bool SettingGetterImplGSettings::LoadAndCheckVersion(
|
| }
|
| g_object_unref(client);
|
|
|
| - std::string path;
|
| - if (!env->GetVar("PATH", &path)) {
|
| - LOG(ERROR) << "No $PATH variable. Assuming no gnome-network-properties.";
|
| - } else {
|
| - // Yes, we're on the UI thread. Yes, we're accessing the file system.
|
| - // Sadly, we don't have much choice. We need the proxy settings and we
|
| - // need them now, and to figure out where to get them, we have to check
|
| - // for this binary. See http://crbug.com/69057 for additional details.
|
| + // Yes, we're on the UI thread. Yes, we're accessing the file system.
|
| + // Sadly, we don't have much choice. We need the proxy settings and we
|
| + // need them now, and to figure out where to get them, we have to check
|
| + // for this binary. See http://crbug.com/69057 for additional details.
|
| + {
|
| base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| -
|
| - for (const base::StringPiece& path_str : base::SplitStringPiece(
|
| - path, ":", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
|
| - base::FilePath file(path_str);
|
| - if (base::PathExists(file.Append("gnome-network-properties"))) {
|
| - VLOG(1) << "Found gnome-network-properties. Will fall back to gconf.";
|
| - return false;
|
| - }
|
| + if (base::ExecutableExistsInPath(env, "gnome-network-properties")) {
|
| + VLOG(1) << "Found gnome-network-properties. Will fall back to gconf.";
|
| + return false;
|
| }
|
| }
|
|
|
|
|