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

Unified Diff: chrome/browser/locale_tests_uitest.cc

Issue 3043018: base: Add UnSetEnv function to EnvVarGetter API. (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
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
};

Powered by Google App Engine
This is Rietveld 408576698