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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 switches::kStartFullscreen)) { | 375 switches::kStartFullscreen)) { |
376 // It's possible for there to be no browser window, e.g. if someone | 376 // It's possible for there to be no browser window, e.g. if someone |
377 // specified a non-sensical combination of options | 377 // specified a non-sensical combination of options |
378 // ("--kiosk --no_startup_window"); do nothing in that case. | 378 // ("--kiosk --no_startup_window"); do nothing in that case. |
379 Browser* browser = BrowserList::GetInstance(desktop_type)->GetLastActive(); | 379 Browser* browser = BrowserList::GetInstance(desktop_type)->GetLastActive(); |
380 if (browser) | 380 if (browser) |
381 chrome::ToggleFullscreenMode(browser); | 381 chrome::ToggleFullscreenMode(browser); |
382 } | 382 } |
383 | 383 |
384 #if defined(OS_WIN) | 384 #if defined(OS_WIN) |
| 385 // TODO(gab): This could now run only during Active Setup (i.e. on explicit |
| 386 // Active Setup versioning and on OS upgrades) instead of every startup. |
| 387 // http://crbug.com/577697 |
385 if (process_startup) | 388 if (process_startup) |
386 ShellIntegration::MigrateChromiumShortcuts(); | 389 ShellIntegration::MigrateChromiumShortcuts(); |
387 #endif // defined(OS_WIN) | 390 #endif // defined(OS_WIN) |
388 | 391 |
389 return true; | 392 return true; |
390 } | 393 } |
391 | 394 |
392 bool StartupBrowserCreatorImpl::IsAppLaunch(std::string* app_url, | 395 bool StartupBrowserCreatorImpl::IsAppLaunch(std::string* app_url, |
393 std::string* app_id) { | 396 std::string* app_id) { |
394 if (command_line_.HasSwitch(switches::kApp)) { | 397 if (command_line_.HasSwitch(switches::kApp)) { |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 #if defined(OS_WIN) | 999 #if defined(OS_WIN) |
997 TriggeredProfileResetter* triggered_profile_resetter = | 1000 TriggeredProfileResetter* triggered_profile_resetter = |
998 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1001 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
999 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1002 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
1000 if (triggered_profile_resetter) { | 1003 if (triggered_profile_resetter) { |
1001 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1004 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
1002 } | 1005 } |
1003 #endif // defined(OS_WIN) | 1006 #endif // defined(OS_WIN) |
1004 return has_reset_trigger; | 1007 return has_reset_trigger; |
1005 } | 1008 } |
OLD | NEW |