diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 16:55:40 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 16:55:40 +0000 |
commit | fc586c7e48d90dac7963906bf34c8f6382b55846 (patch) | |
tree | 6357b8467129dbf4a5c970f1f7c4645da2bd9e51 /chrome/browser/locale_tests_uitest.cc | |
parent | f44f18cee25dd55a14f1df0e99ac2c9e3e9214bc (diff) | |
download | chromium_src-fc586c7e48d90dac7963906bf34c8f6382b55846.zip chromium_src-fc586c7e48d90dac7963906bf34c8f6382b55846.tar.gz chromium_src-fc586c7e48d90dac7963906bf34c8f6382b55846.tar.bz2 |
Reland r54418 - base: Add UnSetEnv function to EnvVarGetter API.
This reverts commit 7ed083f6d2b1b0a09c8bf9470386ba3e38f2feed.
It was reverted due to crbug.com/50663 started failing when I land this patch,
so I'm relanding it now again.
BUG=None
TEST=trybots
TBR=thestig@chromium.org
Review URL: http://codereview.chromium.org/3043018
Review URL: http://codereview.chromium.org/3076020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/locale_tests_uitest.cc')
-rw-r--r-- | chrome/browser/locale_tests_uitest.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/locale_tests_uitest.cc b/chrome/browser/locale_tests_uitest.cc index 54cf202..d5cb994 100644 --- a/chrome/browser/locale_tests_uitest.cc +++ b/chrome/browser/locale_tests_uitest.cc @@ -1,9 +1,10 @@ -// Copyright (c) 2006-2008 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. #include "chrome/test/ui/ui_test.h" +#include "base/env_var.h" #include "build/build_config.h" class LocaleTestsBase : public UITest { @@ -14,10 +15,11 @@ class LocaleTestsBase : public UITest { protected: void RestoreLcAllEnvironment() { #if defined(OS_LINUX) + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); if (old_lc_all_) { - setenv("LC_ALL", old_lc_all_, 1); + env->SetEnv("LC_ALL", old_lc_all_); } else { - unsetenv("LC_ALL"); + env->UnSetEnv("LC_ALL"); } #endif }; |