mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 11:57:48 -03:00
Update startup_browser_creator_impl.cc
This commit is contained in:
parent
d003c667cc
commit
dda1e49525
1 changed files with 10 additions and 9 deletions
|
@ -22,7 +22,6 @@
|
|||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
|
||||
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
|
||||
#include "chrome/browser/defaults.h"
|
||||
#include "chrome/browser/infobars/simple_alert_infobar_creator.h"
|
||||
|
@ -56,6 +55,7 @@
|
|||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/url_constants.h"
|
||||
#include "components/custom_handlers/protocol_handler_registry.h"
|
||||
#include "components/infobars/content/content_infobar_manager.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/public/browser/child_process_security_policy.h"
|
||||
|
@ -247,8 +247,9 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser(
|
|||
}
|
||||
|
||||
bool first_tab = true;
|
||||
ProtocolHandlerRegistry* registry = profile_ ?
|
||||
ProtocolHandlerRegistryFactory::GetForBrowserContext(profile_) : NULL;
|
||||
custom_handlers::ProtocolHandlerRegistry* registry =
|
||||
profile_ ? ProtocolHandlerRegistryFactory::GetForBrowserContext(profile_)
|
||||
: NULL;
|
||||
for (size_t i = 0; i < tabs.size(); ++i) {
|
||||
// We skip URLs that we'd have to launch an external protocol handler for.
|
||||
// This avoids us getting into an infinite loop asking ourselves to open
|
||||
|
@ -346,16 +347,16 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch(
|
|||
!SessionStartupPref::TypeHasRecommendedValue(profile_->GetPrefs());
|
||||
}
|
||||
|
||||
// TODO(https://crbug.com/1276034): Cleanup this code, in particular on Ash
|
||||
// where the welcome flow is never shown.
|
||||
bool welcome_enabled = true;
|
||||
#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
welcome_enabled =
|
||||
welcome::IsEnabled(profile_) && welcome::HasModulesToShow(profile_);
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
if (AccountConsistencyModeManager::IsMirrorEnabledForProfile(profile_))
|
||||
welcome_enabled = false;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
#elif !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
welcome_enabled =
|
||||
welcome::IsEnabled(profile_) && welcome::HasModulesToShow(profile_);
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
const bool whats_new_enabled =
|
||||
promotional_tabs_enabled && whats_new::ShouldShowForState(local_state);
|
||||
|
|
Loading…
Reference in a new issue