Chromium Code Reviews| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "apps/app_restore_service.h" | 10 #include "apps/app_restore_service.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 490 } | 490 } |
| 491 } | 491 } |
| 492 return false; | 492 return false; |
| 493 } | 493 } |
| 494 | 494 |
| 495 void StartupBrowserCreatorImpl::ProcessLaunchURLs( | 495 void StartupBrowserCreatorImpl::ProcessLaunchURLs( |
| 496 bool process_startup, | 496 bool process_startup, |
| 497 const std::vector<GURL>& urls_to_open, | 497 const std::vector<GURL>& urls_to_open, |
| 498 chrome::HostDesktopType desktop_type) { | 498 chrome::HostDesktopType desktop_type) { |
| 499 // If we're starting up in "background mode" (no open browser window) then | 499 // If we're starting up in "background mode" (no open browser window) then |
| 500 // don't open any browser windows, unless kAutoLaunchAtStartup is also | 500 // don't open any browser windows, unless kAutoLaunchAtStartup is also |
|
grt (UTC plus 2)
2015/11/12 17:49:02
please update this comment
gab
2015/11/12 18:44:26
Done.
| |
| 501 // specified. | 501 // specified. |
| 502 if (process_startup && | 502 if (process_startup && command_line_.HasSwitch(switches::kNoStartupWindow)) |
| 503 command_line_.HasSwitch(switches::kNoStartupWindow) && | |
| 504 !command_line_.HasSwitch(switches::kAutoLaunchAtStartup)) { | |
| 505 return; | 503 return; |
| 506 } | |
| 507 | 504 |
| 508 // Determine whether or not this launch must include the welcome page. | 505 // Determine whether or not this launch must include the welcome page. |
| 509 InitializeWelcomeRunType(urls_to_open); | 506 InitializeWelcomeRunType(urls_to_open); |
| 510 | 507 |
| 511 // TODO(tapted): Move this to startup_browser_creator_win.cc after refactor. | 508 // TODO(tapted): Move this to startup_browser_creator_win.cc after refactor. |
| 512 #if defined(OS_WIN) | 509 #if defined(OS_WIN) |
| 513 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 510 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 514 // See if there are apps for this profile that should be launched on startup | 511 // See if there are apps for this profile that should be launched on startup |
| 515 // due to a switch from Metro mode. | 512 // due to a switch from Metro mode. |
| 516 app_metro_launch::HandleAppLaunchForMetroRestart(profile_); | 513 app_metro_launch::HandleAppLaunchForMetroRestart(profile_); |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1000 TriggeredProfileResetter* triggered_profile_resetter = | 997 TriggeredProfileResetter* triggered_profile_resetter = |
| 1001 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 998 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
| 1002 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 999 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
| 1003 if (triggered_profile_resetter) { | 1000 if (triggered_profile_resetter) { |
| 1004 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1001 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
| 1005 triggered_profile_resetter->ClearResetTrigger(); | 1002 triggered_profile_resetter->ClearResetTrigger(); |
| 1006 } | 1003 } |
| 1007 #endif // defined(OS_WIN) | 1004 #endif // defined(OS_WIN) |
| 1008 return has_reset_trigger; | 1005 return has_reset_trigger; |
| 1009 } | 1006 } |
| OLD | NEW |