| Index: chrome/app/client_util.cc
|
| diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc
|
| index a360d516252e48d0fd69bd6f828afc03f20ef2a0..61d8c40cff6749d58080eebe12234552957fa9c0 100644
|
| --- a/chrome/app/client_util.cc
|
| +++ b/chrome/app/client_util.cc
|
| @@ -1,4 +1,4 @@
|
| -// 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.
|
|
|
| @@ -6,9 +6,12 @@
|
| #include <shlwapi.h>
|
|
|
| #include "base/command_line.h"
|
| -#include "base/logging.h"
|
| +#include "base/environment.h"
|
| #include "base/file_util.h"
|
| #include "base/trace_event.h"
|
| +#include "base/logging.h"
|
| +#include "base/scoped_ptr.h"
|
| +#include "base/utf_string_conversions.h"
|
| #include "chrome/app/breakpad_win.h"
|
| #include "chrome/app/client_util.h"
|
| #include "chrome/common/chrome_switches.h"
|
| @@ -228,9 +231,10 @@ int MainDllLoader::Launch(HINSTANCE instance,
|
| if (!dll_)
|
| return ResultCodes::MISSING_DATA;
|
|
|
| - ::SetEnvironmentVariableW(
|
| - BrowserDistribution::GetDistribution()->GetEnvVersionKey().c_str(),
|
| - version.c_str());
|
| + scoped_ptr<base::Environment> env(base::Environment::Create());
|
| + env->SetVar(WideToUTF8(
|
| + BrowserDistribution::GetDistribution()->GetEnvVersionKey()).c_str(),
|
| + WideToUTF8(version));
|
|
|
| InitCrashReporterWithDllPath(file);
|
| OnBeforeLaunch(version);
|
|
|