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

Side by Side Diff: chrome/browser/browser_init.cc

Issue 3029062: base: rename Environment::GetEnv to Environment::GetVar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « base/xdg_util_unittest.cc ('k') | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_init.h" 5 #include "chrome/browser/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 GetStartupInfoW(&si); 309 GetStartupInfoW(&si);
310 if (si.dwFlags & 0x800) { 310 if (si.dwFlags & 0x800) {
311 if (!si.lpTitle) 311 if (!si.lpTitle)
312 return LM_SHORTCUT_NONAME; 312 return LM_SHORTCUT_NONAME;
313 std::wstring shortcut(si.lpTitle); 313 std::wstring shortcut(si.lpTitle);
314 // The windows quick launch path is not localized. 314 // The windows quick launch path is not localized.
315 if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos) 315 if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos)
316 return LM_SHORTCUT_QUICKLAUNCH; 316 return LM_SHORTCUT_QUICKLAUNCH;
317 scoped_ptr<base::Environment> env(base::Environment::Create()); 317 scoped_ptr<base::Environment> env(base::Environment::Create());
318 std::string appdata_path; 318 std::string appdata_path;
319 env->GetEnv("USERPROFILE", &appdata_path); 319 env->GetVar("USERPROFILE", &appdata_path);
320 if (!appdata_path.empty() && 320 if (!appdata_path.empty() &&
321 shortcut.find(ASCIIToWide(appdata_path)) != std::wstring::npos) 321 shortcut.find(ASCIIToWide(appdata_path)) != std::wstring::npos)
322 return LM_SHORTCUT_DESKTOP; 322 return LM_SHORTCUT_DESKTOP;
323 return LM_SHORTCUT_UNKNOWN; 323 return LM_SHORTCUT_UNKNOWN;
324 } 324 }
325 return LM_SHORTCUT_NONE; 325 return LM_SHORTCUT_NONE;
326 } 326 }
327 #else 327 #else
328 // TODO(cpu): Port to other platforms. 328 // TODO(cpu): Port to other platforms.
329 LaunchMode GetLaunchShortcutKind() { 329 LaunchMode GetLaunchShortcutKind() {
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 scoped_refptr<AutomationProviderClass> automation = 1060 scoped_refptr<AutomationProviderClass> automation =
1061 new AutomationProviderClass(profile); 1061 new AutomationProviderClass(profile);
1062 automation->ConnectToChannel(channel_id); 1062 automation->ConnectToChannel(channel_id);
1063 automation->SetExpectedTabCount(expected_tabs); 1063 automation->SetExpectedTabCount(expected_tabs);
1064 1064
1065 AutomationProviderList* list = 1065 AutomationProviderList* list =
1066 g_browser_process->InitAutomationProviderList(); 1066 g_browser_process->InitAutomationProviderList();
1067 DCHECK(list); 1067 DCHECK(list);
1068 list->AddProvider(automation); 1068 list->AddProvider(automation);
1069 } 1069 }
OLDNEW
« no previous file with comments | « base/xdg_util_unittest.cc ('k') | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698