Index: chrome/browser/locale_tests_uitest.cc |
diff --git a/chrome/browser/locale_tests_uitest.cc b/chrome/browser/locale_tests_uitest.cc |
index 54cf20227900a3a53bc2a0c1a7e4c73ebc660baa..d5cb99436b6fa8345795211bdaeaeb7562d5ce1d 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 |
}; |