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

Unified Diff: chrome/browser/browser_init.cc

Issue 2876045: base: Get rid of the deprecated SysInfo::GetEnvVar. (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
« no previous file with comments | « base/sys_info_win.cc ('k') | courgette/encoded_program.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_init.cc
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 5a4fa6ceaa6688e215440ac75d8b1a383a3c0200..cae7ce5024846b180073a5c71fe580f5158bd574 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;
}
« no previous file with comments | « base/sys_info_win.cc ('k') | courgette/encoded_program.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698