| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/startup/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if (shortcut.find(L"\\Quick Launch\\") != base::string16::npos) { | 154 if (shortcut.find(L"\\Quick Launch\\") != base::string16::npos) { |
| 155 if (base::win::GetVersion() >= base::win::VERSION_WIN7) | 155 if (base::win::GetVersion() >= base::win::VERSION_WIN7) |
| 156 return LM_SHORTCUT_TASKBAR; | 156 return LM_SHORTCUT_TASKBAR; |
| 157 else | 157 else |
| 158 return LM_SHORTCUT_QUICKLAUNCH; | 158 return LM_SHORTCUT_QUICKLAUNCH; |
| 159 } | 159 } |
| 160 std::unique_ptr<base::Environment> env(base::Environment::Create()); | 160 std::unique_ptr<base::Environment> env(base::Environment::Create()); |
| 161 std::string appdata_path; | 161 std::string appdata_path; |
| 162 env->GetVar("USERPROFILE", &appdata_path); | 162 env->GetVar("USERPROFILE", &appdata_path); |
| 163 if (!appdata_path.empty() && | 163 if (!appdata_path.empty() && |
| 164 shortcut.find(base::ASCIIToUTF16(appdata_path)) != base::string16::npos) | 164 shortcut.find(base::UTF8ToUTF16(appdata_path)) != base::string16::npos) |
| 165 return LM_SHORTCUT_DESKTOP; | 165 return LM_SHORTCUT_DESKTOP; |
| 166 return LM_SHORTCUT_UNKNOWN; | 166 return LM_SHORTCUT_UNKNOWN; |
| 167 } | 167 } |
| 168 return LM_SHORTCUT_NONE; | 168 return LM_SHORTCUT_NONE; |
| 169 } | 169 } |
| 170 #else | 170 #else |
| 171 // TODO(cpu): Port to other platforms. | 171 // TODO(cpu): Port to other platforms. |
| 172 LaunchMode GetLaunchShortcutKind() { | 172 LaunchMode GetLaunchShortcutKind() { |
| 173 return LM_LINUX_MAC_BEOS; | 173 return LM_LINUX_MAC_BEOS; |
| 174 } | 174 } |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 #if defined(OS_WIN) | 1004 #if defined(OS_WIN) |
| 1005 TriggeredProfileResetter* triggered_profile_resetter = | 1005 TriggeredProfileResetter* triggered_profile_resetter = |
| 1006 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1006 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
| 1007 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1007 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
| 1008 if (triggered_profile_resetter) { | 1008 if (triggered_profile_resetter) { |
| 1009 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1009 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
| 1010 } | 1010 } |
| 1011 #endif // defined(OS_WIN) | 1011 #endif // defined(OS_WIN) |
| 1012 return has_reset_trigger; | 1012 return has_reset_trigger; |
| 1013 } | 1013 } |
| OLD | NEW |