| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 return extension && extension->is_platform_app() ? extension : NULL; | 274 return extension && extension->is_platform_app() ? extension : NULL; |
| 275 } | 275 } |
| 276 | 276 |
| 277 // Appends the contents of |from| to the end of |to|. | 277 // Appends the contents of |from| to the end of |to|. |
| 278 void AppendTabs(const StartupTabs& from, StartupTabs* to) { | 278 void AppendTabs(const StartupTabs& from, StartupTabs* to) { |
| 279 if (!from.empty()) | 279 if (!from.empty()) |
| 280 to->insert(to->end(), from.begin(), from.end()); | 280 to->insert(to->end(), from.begin(), from.end()); |
| 281 } | 281 } |
| 282 | 282 |
| 283 // Determines whether the Consolidated startup flow should be used, based on | 283 // Determines whether the Consolidated startup flow should be used, based on |
| 284 // OS, OS version, and the kUseConsolidatedStartupFlow Feature. | 284 // the kUseConsolidatedStartupFlow Feature. Not enabled on Windows 10+. |
| 285 bool UseConsolidatedFlow() { | 285 bool UseConsolidatedFlow() { |
| 286 #if defined(OS_WIN) | 286 #if defined(OS_WIN) |
| 287 // TODO(tmartino): Enable for Windows 10+ once relevant Win 10-specific logic | 287 // TODO(tmartino): Add a Win10+ specific experiment. |
| 288 // is added to StartupTabProvider. | |
| 289 if (base::win::GetVersion() >= base::win::VERSION_WIN10) | 288 if (base::win::GetVersion() >= base::win::VERSION_WIN10) |
| 290 return false; | 289 return false; |
| 291 #endif // defined(OS_WIN) | 290 #endif // defined(OS_WIN) |
| 292 return base::FeatureList::IsEnabled(features::kUseConsolidatedStartupFlow); | 291 return base::FeatureList::IsEnabled(features::kUseConsolidatedStartupFlow); |
| 293 } | 292 } |
| 294 | 293 |
| 295 } // namespace | 294 } // namespace |
| 296 | 295 |
| 297 namespace internals { | 296 namespace internals { |
| 298 | 297 |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 #if defined(OS_WIN) | 1222 #if defined(OS_WIN) |
| 1224 TriggeredProfileResetter* triggered_profile_resetter = | 1223 TriggeredProfileResetter* triggered_profile_resetter = |
| 1225 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1224 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
| 1226 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1225 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
| 1227 if (triggered_profile_resetter) { | 1226 if (triggered_profile_resetter) { |
| 1228 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1227 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
| 1229 } | 1228 } |
| 1230 #endif // defined(OS_WIN) | 1229 #endif // defined(OS_WIN) |
| 1231 return has_reset_trigger; | 1230 return has_reset_trigger; |
| 1232 } | 1231 } |
| OLD | NEW |