OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |