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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 // specially here, otherwise it will be handled below. | 327 // specially here, otherwise it will be handled below. |
328 if (extension) { | 328 if (extension) { |
329 RecordCmdLineAppHistogram(extensions::Manifest::TYPE_PLATFORM_APP); | 329 RecordCmdLineAppHistogram(extensions::Manifest::TYPE_PLATFORM_APP); |
330 AppLaunchParams params(profile, extension, | 330 AppLaunchParams params(profile, extension, |
331 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, | 331 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, |
332 extensions::SOURCE_COMMAND_LINE); | 332 extensions::SOURCE_COMMAND_LINE); |
333 params.command_line = command_line_; | 333 params.command_line = command_line_; |
334 params.current_directory = cur_dir_; | 334 params.current_directory = cur_dir_; |
335 // If we are being launched from the command line, default to native | 335 // If we are being launched from the command line, default to native |
336 // desktop. | 336 // desktop. |
337 params.desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; | |
338 ::OpenApplicationWithReenablePrompt(params); | 337 ::OpenApplicationWithReenablePrompt(params); |
339 return true; | 338 return true; |
340 } | 339 } |
341 } | 340 } |
342 | 341 |
343 // Open the required browser windows and tabs. First, see if | 342 // Open the required browser windows and tabs. First, see if |
344 // we're being run as an application window. If so, the user | 343 // we're being run as an application window. If so, the user |
345 // opened an app shortcut. Don't restore tabs or open initial | 344 // opened an app shortcut. Don't restore tabs or open initial |
346 // URLs in that case. The user should see the window as an app, | 345 // URLs in that case. The user should see the window as an app, |
347 // not as chrome. | 346 // not as chrome. |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 #if defined(OS_WIN) | 1015 #if defined(OS_WIN) |
1017 TriggeredProfileResetter* triggered_profile_resetter = | 1016 TriggeredProfileResetter* triggered_profile_resetter = |
1018 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1017 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
1019 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1018 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
1020 if (triggered_profile_resetter) { | 1019 if (triggered_profile_resetter) { |
1021 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1020 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
1022 } | 1021 } |
1023 #endif // defined(OS_WIN) | 1022 #endif // defined(OS_WIN) |
1024 return has_reset_trigger; | 1023 return has_reset_trigger; |
1025 } | 1024 } |
OLD | NEW |