| Index: chrome/common/logging_chrome_uitest.cc
|
| diff --git a/chrome/common/logging_chrome_uitest.cc b/chrome/common/logging_chrome_uitest.cc
|
| index 1b64cae7589f86ee649dc3fe09f014b836af5c68..648aaced9008e5da4d54bdf6462dcf1fad135199 100644
|
| --- a/chrome/common/logging_chrome_uitest.cc
|
| +++ b/chrome/common/logging_chrome_uitest.cc
|
| @@ -29,24 +29,14 @@ class ChromeLoggingTest : public testing::Test {
|
| if (!env->GetEnv(env_vars::kLogFileName, &environment_filename_))
|
| environment_filename_ = "";
|
|
|
| - // TODO(port) Add base::SetEnv() and get rid of the ifdefs.
|
| -#if defined(OS_WIN)
|
| - SetEnvironmentVariable(ASCIIToWide(env_vars::kLogFileName).c_str(),
|
| - ASCIIToWide(new_value).c_str());
|
| -#else
|
| - setenv(env_vars::kLogFileName, new_value.c_str(), 1);
|
| -#endif
|
| + env->SetEnv(env_vars::kLogFileName, new_value);
|
| }
|
|
|
| // Restores the value of the log file nave environment variable
|
| // previously saved by SaveEnvironmentVariable().
|
| void RestoreEnvironmentVariable() {
|
| -#if defined(OS_WIN)
|
| - SetEnvironmentVariable(ASCIIToWide(env_vars::kLogFileName).c_str(),
|
| - ASCIIToWide(environment_filename_).c_str());
|
| -#else
|
| - setenv(env_vars::kLogFileName, environment_filename_.c_str(), 1);
|
| -#endif
|
| + scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
|
| + env->SetEnv(env_vars::kLogFileName, environment_filename_);
|
| }
|
|
|
| private:
|
|
|