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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 // tabs to be displayed on first run, overriding all non-command-line tabs, | 688 // tabs to be displayed on first run, overriding all non-command-line tabs, |
689 // including the profile reset tab. | 689 // including the profile reset tab. |
690 StartupTabs distribution_tabs = | 690 StartupTabs distribution_tabs = |
691 provider.GetDistributionFirstRunTabs(browser_creator_); | 691 provider.GetDistributionFirstRunTabs(browser_creator_); |
692 if (!distribution_tabs.empty()) | 692 if (!distribution_tabs.empty()) |
693 return distribution_tabs; | 693 return distribution_tabs; |
694 | 694 |
695 // Policies for onboarding (e.g., first run) may show promotional and | 695 // Policies for onboarding (e.g., first run) may show promotional and |
696 // introductory content depending on a number of system status factors, | 696 // introductory content depending on a number of system status factors, |
697 // including OS and whether or not this is First Run. | 697 // including OS and whether or not this is First Run. |
698 StartupTabs onboarding_tabs = provider.GetOnboardingTabs(); | 698 StartupTabs onboarding_tabs = provider.GetOnboardingTabs(profile_); |
699 AppendTabs(onboarding_tabs, &tabs); | 699 AppendTabs(onboarding_tabs, &tabs); |
700 | 700 |
701 // If the user has set the preference indicating URLs to show on opening, | 701 // If the user has set the preference indicating URLs to show on opening, |
702 // read and add those. | 702 // read and add those. |
703 StartupTabs prefs_tabs = provider.GetPreferencesTabs(command_line_, profile_); | 703 StartupTabs prefs_tabs = provider.GetPreferencesTabs(command_line_, profile_); |
704 AppendTabs(prefs_tabs, &tabs); | 704 AppendTabs(prefs_tabs, &tabs); |
705 | 705 |
706 // Potentially add the New Tab Page. Onboarding content is designed to | 706 // Potentially add the New Tab Page. Onboarding content is designed to |
707 // replace (and eventually funnel the user to) the NTP. Likewise, URLs | 707 // replace (and eventually funnel the user to) the NTP. Likewise, URLs |
708 // from preferences are explicitly meant to override showing the NTP. | 708 // from preferences are explicitly meant to override showing the NTP. |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 #if defined(OS_WIN) | 1221 #if defined(OS_WIN) |
1222 TriggeredProfileResetter* triggered_profile_resetter = | 1222 TriggeredProfileResetter* triggered_profile_resetter = |
1223 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1223 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
1224 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1224 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
1225 if (triggered_profile_resetter) { | 1225 if (triggered_profile_resetter) { |
1226 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1226 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
1227 } | 1227 } |
1228 #endif // defined(OS_WIN) | 1228 #endif // defined(OS_WIN) |
1229 return has_reset_trigger; | 1229 return has_reset_trigger; |
1230 } | 1230 } |
OLD | NEW |