summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 03:56:17 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 03:56:17 +0000
commit6c817557ed5fa92658cfc0616fe72a71643491f9 (patch)
treebeb3ef6cdc6aaa5e5737b64d23bd62cca0787a1c /chrome
parent33d396b083d7096f7c44ea76fd4a6765dec75d87 (diff)
downloadchromium_src-6c817557ed5fa92658cfc0616fe72a71643491f9.zip
chromium_src-6c817557ed5fa92658cfc0616fe72a71643491f9.tar.gz
chromium_src-6c817557ed5fa92658cfc0616fe72a71643491f9.tar.bz2
base: Get rid of the deprecated SysInfo::GetEnvVar.
Use the new EnvVarGetter::GetEnv instead. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/2876045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_init.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index b1fc8dd..d75b0e2 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -8,9 +8,10 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/env_var.h"
#include "base/event_recorder.h"
#include "base/path_service.h"
-#include "base/sys_info.h"
+#include "base/scoped_ptr.h"
#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/automation/chrome_frame_automation_provider.h"
#include "chrome/browser/browser_list.h"
@@ -307,9 +308,11 @@ LaunchMode GetLaunchShortcutKind() {
// The windows quick launch path is not localized.
if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos)
return LM_SHORTCUT_QUICKLAUNCH;
- std::wstring appdata_path = base::SysInfo::GetEnvVar(L"USERPROFILE");
+ scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
+ std::string appdata_path;
+ env->GetEnv("USERPROFILE", &appdata_path);
if (!appdata_path.empty() &&
- shortcut.find(appdata_path) != std::wstring::npos)
+ shortcut.find(ASCIIToWide(appdata_path)) != std::wstring::npos)
return LM_SHORTCUT_DESKTOP;
return LM_SHORTCUT_UNKNOWN;
}