| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // The static helper methods below implement the policies relevant to the | 57 // The static helper methods below implement the policies relevant to the |
| 58 // respective Get*Tabs methods, but do not gather or interact with any | 58 // respective Get*Tabs methods, but do not gather or interact with any |
| 59 // system state relating to making those policy decisions. Exposed for | 59 // system state relating to making those policy decisions. Exposed for |
| 60 // testing. | 60 // testing. |
| 61 | 61 |
| 62 // Determines which tabs should be shown according to onboarding/first | 62 // Determines which tabs should be shown according to onboarding/first |
| 63 // run policy. | 63 // run policy. |
| 64 static StartupTabs GetStandardOnboardingTabsForState( | 64 static StartupTabs GetStandardOnboardingTabsForState( |
| 65 bool is_first_run, | 65 bool is_first_run, |
| 66 bool has_seen_welcome_page, | 66 bool has_seen_welcome_page, |
| 67 bool is_signin_allowed, |
| 67 bool is_signed_in, | 68 bool is_signed_in, |
| 68 bool is_supervised_user); | 69 bool is_supervised_user); |
| 69 | 70 |
| 70 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
| 71 // Determines which tabs should be shown according to onboarding/first run | 72 // Determines which tabs should be shown according to onboarding/first run |
| 72 // policy, including promo content specific to Windows 10. | 73 // policy, including promo content specific to Windows 10. |
| 73 static StartupTabs GetWin10OnboardingTabsForState( | 74 static StartupTabs GetWin10OnboardingTabsForState( |
| 74 bool is_first_run, | 75 bool is_first_run, |
| 75 bool has_seen_welcome_page, | 76 bool has_seen_welcome_page, |
| 76 bool has_seen_win10_promo, | 77 bool has_seen_win10_promo, |
| 78 bool is_signin_allowed, |
| 77 bool is_signed_in, | 79 bool is_signed_in, |
| 78 bool set_default_browser_allowed, | 80 bool set_default_browser_allowed, |
| 79 bool is_default_browser, | 81 bool is_default_browser, |
| 80 bool is_supervised_user); | 82 bool is_supervised_user); |
| 81 #endif | 83 #endif |
| 82 | 84 |
| 83 // Processes first run URLs specified in Master Preferences file, replacing | 85 // Processes first run URLs specified in Master Preferences file, replacing |
| 84 // any "magic word" URL hosts with appropriate URLs. | 86 // any "magic word" URL hosts with appropriate URLs. |
| 85 static StartupTabs GetMasterPrefsTabsForState( | 87 static StartupTabs GetMasterPrefsTabsForState( |
| 86 bool is_first_run, | 88 bool is_first_run, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line, | 138 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line, |
| 137 Profile* profile) const override; | 139 Profile* profile) const override; |
| 138 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line, | 140 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line, |
| 139 Profile* profile) const override; | 141 Profile* profile) const override; |
| 140 | 142 |
| 141 private: | 143 private: |
| 142 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl); | 144 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl); |
| 143 }; | 145 }; |
| 144 | 146 |
| 145 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ | 147 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ |
| OLD | NEW |