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

Unified Diff: courgette/encoded_program.cc

Issue 2876045: base: Get rid of the deprecated SysInfo::GetEnvVar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: " Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/encoded_program.cc
diff --git a/courgette/encoded_program.cc b/courgette/encoded_program.cc
index 1265312143eb56e3c730221afe36308e486b2376..71bd65ab213de95090f32d0a2d7d0ad647bd6de4 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);
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698