move defined(OS) > BUILDFLAG(IS)

This commit is contained in:
Alexander David Frick 2022-01-18 08:02:56 -06:00 committed by GitHub
parent ef5095d690
commit 9bf59a41f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2022 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
@ -65,12 +65,12 @@
#include "rlz/buildflags/buildflags.h" #include "rlz/buildflags/buildflags.h"
#include "ui/base/buildflags.h" #include "ui/base/buildflags.h"
#if defined(OS_MAC) #if BUILDFLAG(IS_MAC)
#include "base/mac/mac_util.h" #include "base/mac/mac_util.h"
#include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h" #include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h"
#endif #endif
#if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
#include "chrome/browser/win/conflicts/incompatible_applications_updater.h" #include "chrome/browser/win/conflicts/incompatible_applications_updater.h"
#endif #endif
@ -184,7 +184,7 @@ void StartupBrowserCreatorImpl::Launch(
command_line_.GetSwitchValueASCII(switches::kInstallChromeApp)); command_line_.GetSwitchValueASCII(switches::kInstallChromeApp));
} }
#if defined(OS_MAC) #if BUILDFLAG(IS_MAC)
if (process_startup == chrome::startup::IsProcessStartup::kYes) { if (process_startup == chrome::startup::IsProcessStartup::kYes) {
// Check whether the auto-update system needs to be promoted from user // Check whether the auto-update system needs to be promoted from user
// to system. // to system.
@ -311,7 +311,7 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch(
const bool is_incognito_or_guest = profile_->IsOffTheRecord(); const bool is_incognito_or_guest = profile_->IsOffTheRecord();
bool is_post_crash_launch = HasPendingUncleanExit(profile_); bool is_post_crash_launch = HasPendingUncleanExit(profile_);
bool has_incompatible_applications = false; bool has_incompatible_applications = false;
#if defined(OS_WIN) #if BUILDFLAG(IS_WIN)
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
if (is_post_crash_launch) { if (is_post_crash_launch) {
// Check if there are any incompatible applications cached from the last // Check if there are any incompatible applications cached from the last
@ -383,7 +383,7 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch(
SessionRestore::BehaviorBitmask restore_options = SessionRestore::BehaviorBitmask restore_options =
SessionRestore::RESTORE_BROWSER; SessionRestore::RESTORE_BROWSER;
if (behavior == BrowserOpenBehavior::SYNCHRONOUS_RESTORE) { if (behavior == BrowserOpenBehavior::SYNCHRONOUS_RESTORE) {
#if defined(OS_MAC) #if BUILDFLAG(IS_MAC)
bool was_mac_login_or_resume = base::mac::WasLaunchedAsLoginOrResumeItem(); bool was_mac_login_or_resume = base::mac::WasLaunchedAsLoginOrResumeItem();
#else #else
bool was_mac_login_or_resume = false; bool was_mac_login_or_resume = false;
@ -479,7 +479,7 @@ StartupBrowserCreatorImpl::DetermineStartupTabs(
StartupTabs onboarding_tabs; StartupTabs onboarding_tabs;
if (promotional_tabs_enabled) { if (promotional_tabs_enabled) {
StartupTabs welcome_back_tabs; StartupTabs welcome_back_tabs;
#if defined(OS_WIN) #if BUILDFLAG(IS_WIN)
// This is a launch from a prompt presented to an inactive user who chose // This is a launch from a prompt presented to an inactive user who chose
// to open Chrome and is being brought to a specific URL for this one // to open Chrome and is being brought to a specific URL for this one
// launch. Launch the browser with the desired welcome back URL in the // launch. Launch the browser with the desired welcome back URL in the
@ -488,7 +488,7 @@ StartupBrowserCreatorImpl::DetermineStartupTabs(
welcome_back_tabs = provider.GetWelcomeBackTabs( welcome_back_tabs = provider.GetWelcomeBackTabs(
profile_, browser_creator_, process_startup); profile_, browser_creator_, process_startup);
AppendTabs(welcome_back_tabs, &tabs); AppendTabs(welcome_back_tabs, &tabs);
#endif // defined(OS_WIN) #endif // BUILDFLAG(IS_WIN)
if (welcome_enabled) { if (welcome_enabled) {
// Policies for welcome (e.g., first run) may show promotional and // Policies for welcome (e.g., first run) may show promotional and