| 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 } | 554 } |
| 555 } | 555 } |
| 556 | 556 |
| 557 // Session startup didn't occur, open the urls. | 557 // Session startup didn't occur, open the urls. |
| 558 Browser* browser = NULL; | 558 Browser* browser = NULL; |
| 559 std::vector<GURL> adjusted_urls = urls_to_open; | 559 std::vector<GURL> adjusted_urls = urls_to_open; |
| 560 if (adjusted_urls.empty()) { | 560 if (adjusted_urls.empty()) { |
| 561 AddStartupURLs(&adjusted_urls); | 561 AddStartupURLs(&adjusted_urls); |
| 562 } else if (!command_line_.HasSwitch(switches::kOpenInNewWindow)) { | 562 } else if (!command_line_.HasSwitch(switches::kOpenInNewWindow)) { |
| 563 // Always open a list of urls in a window on the native desktop. | 563 // Always open a list of urls in a window on the native desktop. |
| 564 browser = chrome::FindTabbedBrowser(profile_, false, | 564 browser = chrome::FindTabbedBrowser(profile_, false); |
| 565 chrome::HOST_DESKTOP_TYPE_NATIVE); | |
| 566 } | 565 } |
| 567 // This will launch a browser; prevent session restore. | 566 // This will launch a browser; prevent session restore. |
| 568 StartupBrowserCreator::in_synchronous_profile_launch_ = true; | 567 StartupBrowserCreator::in_synchronous_profile_launch_ = true; |
| 569 browser = | 568 browser = |
| 570 OpenURLsInBrowser(browser, process_startup, adjusted_urls, desktop_type); | 569 OpenURLsInBrowser(browser, process_startup, adjusted_urls, desktop_type); |
| 571 StartupBrowserCreator::in_synchronous_profile_launch_ = false; | 570 StartupBrowserCreator::in_synchronous_profile_launch_ = false; |
| 572 AddInfoBarsIfNecessary(browser, is_process_startup); | 571 AddInfoBarsIfNecessary(browser, is_process_startup); |
| 573 } | 572 } |
| 574 | 573 |
| 575 bool StartupBrowserCreatorImpl::ProcessStartupURLs( | 574 bool StartupBrowserCreatorImpl::ProcessStartupURLs( |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 #if defined(OS_WIN) | 998 #if defined(OS_WIN) |
| 1000 TriggeredProfileResetter* triggered_profile_resetter = | 999 TriggeredProfileResetter* triggered_profile_resetter = |
| 1001 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1000 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
| 1002 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1001 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
| 1003 if (triggered_profile_resetter) { | 1002 if (triggered_profile_resetter) { |
| 1004 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1003 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
| 1005 } | 1004 } |
| 1006 #endif // defined(OS_WIN) | 1005 #endif // defined(OS_WIN) |
| 1007 return has_reset_trigger; | 1006 return has_reset_trigger; |
| 1008 } | 1007 } |
| OLD | NEW |