diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 03:56:17 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 03:56:17 +0000 |
commit | 6c817557ed5fa92658cfc0616fe72a71643491f9 (patch) | |
tree | beb3ef6cdc6aaa5e5737b64d23bd62cca0787a1c /courgette | |
parent | 33d396b083d7096f7c44ea76fd4a6765dec75d87 (diff) | |
download | chromium_src-6c817557ed5fa92658cfc0616fe72a71643491f9.zip chromium_src-6c817557ed5fa92658cfc0616fe72a71643491f9.tar.gz chromium_src-6c817557ed5fa92658cfc0616fe72a71643491f9.tar.bz2 |
base: Get rid of the deprecated SysInfo::GetEnvVar.
Use the new EnvVarGetter::GetEnv instead.
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/2876045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-rw-r--r-- | courgette/encoded_program.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/courgette/encoded_program.cc b/courgette/encoded_program.cc index 1265312..71bd65a 100644 --- a/courgette/encoded_program.cc +++ b/courgette/encoded_program.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,8 +9,10 @@ #include <string> #include <vector> +#include "base/env_var.h" #include "base/logging.h" -#include "base/sys_info.h" +#include "base/scoped_ptr.h" +#include "base/string_util.h" #include "courgette/courgette.h" #include "courgette/streams.h" @@ -264,9 +266,11 @@ enum FieldSelect { static FieldSelect GetFieldSelect() { #if 1 // TODO(sra): Use better configuration. - std::wstring s = base::SysInfo::GetEnvVar(L"A_FIELDS"); + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); + std::string s; + env->GetEnv("A_FIELDS", &s); if (!s.empty()) { - return static_cast<FieldSelect>(wcstoul(s.c_str(), 0, 0)); + return static_cast<FieldSelect>(wcstoul(ASCIIToWide(s).c_str(), 0, 0)); } #endif return static_cast<FieldSelect>(~0); |