Commit c6346a15 authored by Sean McAllister's avatar Sean McAllister Committed by Commit Bot

Refactor OS_LINUX preprocessor directive for LaCrOS effort.

Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

This is changes for /weblayer

This CL was uploaded by git cl split.

R=nator@chromium.org

Bug: 1110266
Change-Id: I43b0a1f583fd61f28a52315b1a81445306a44f52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371305
Commit-Queue: Sean McAllister <smcallis@google.com>
Auto-Submit: Sean McAllister <smcallis@google.com>
Reviewed-by: default avatarMugdha Lakhani <nator@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801058}
parent 9b042dd2
...@@ -219,7 +219,8 @@ bool ContentMainDelegateImpl::ShouldCreateFeatureList() { ...@@ -219,7 +219,8 @@ bool ContentMainDelegateImpl::ShouldCreateFeatureList() {
} }
void ContentMainDelegateImpl::PreSandboxStartup() { void ContentMainDelegateImpl::PreSandboxStartup() {
#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) #if defined(ARCH_CPU_ARM_FAMILY) && \
(defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS))
// Create an instance of the CPU class to parse /proc/cpuinfo and cache // Create an instance of the CPU class to parse /proc/cpuinfo and cache
// cpu_brand info. // cpu_brand info.
base::CPU cpu_info; base::CPU cpu_info;
......
...@@ -148,7 +148,7 @@ int BrowserMainPartsImpl::PreEarlyInitialization() { ...@@ -148,7 +148,7 @@ int BrowserMainPartsImpl::PreEarlyInitialization() {
if (!features::IsUsingOzonePlatform()) if (!features::IsUsingOzonePlatform())
ui::SetDefaultX11ErrorHandlers(); ui::SetDefaultX11ErrorHandlers();
#endif #endif
#if defined(USE_AURA) && defined(OS_LINUX) #if defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
ui::InitializeInputMethodForTesting(); ui::InitializeInputMethodForTesting();
#endif #endif
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
#include "weblayer/browser/tts_environment_android_impl.h" #include "weblayer/browser/tts_environment_android_impl.h"
#endif #endif
#if defined(OS_LINUX) || defined(OS_ANDROID) #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
#include "content/public/common/content_descriptors.h" #include "content/public/common/content_descriptors.h"
#endif #endif
...@@ -784,7 +784,7 @@ SafeBrowsingService* ContentBrowserClientImpl::GetSafeBrowsingService() { ...@@ -784,7 +784,7 @@ SafeBrowsingService* ContentBrowserClientImpl::GetSafeBrowsingService() {
} }
#endif #endif
#if defined(OS_LINUX) || defined(OS_ANDROID) #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
void ContentBrowserClientImpl::GetAdditionalMappedFilesForChildProcess( void ContentBrowserClientImpl::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line, const base::CommandLine& command_line,
int child_process_id, int child_process_id,
...@@ -818,7 +818,7 @@ void ContentBrowserClientImpl::GetAdditionalMappedFilesForChildProcess( ...@@ -818,7 +818,7 @@ void ContentBrowserClientImpl::GetAdditionalMappedFilesForChildProcess(
mappings->Share(service_manager::kCrashDumpSignal, crash_signal_fd); mappings->Share(service_manager::kCrashDumpSignal, crash_signal_fd);
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
} }
#endif // defined(OS_LINUX) || defined(OS_ANDROID) #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
void ContentBrowserClientImpl::AppendExtraCommandLineSwitches( void ContentBrowserClientImpl::AppendExtraCommandLineSwitches(
base::CommandLine* command_line, base::CommandLine* command_line,
......
...@@ -113,12 +113,12 @@ class ContentBrowserClientImpl : public content::ContentBrowserClient { ...@@ -113,12 +113,12 @@ class ContentBrowserClientImpl : public content::ContentBrowserClient {
void RenderProcessWillLaunch(content::RenderProcessHost* host) override; void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext() scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext()
override; override;
#if defined(OS_LINUX) || defined(OS_ANDROID) #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
void GetAdditionalMappedFilesForChildProcess( void GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line, const base::CommandLine& command_line,
int child_process_id, int child_process_id,
content::PosixFileDescriptorInfo* mappings) override; content::PosixFileDescriptorInfo* mappings) override;
#endif // defined(OS_LINUX) || defined(OS_ANDROID) #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
void AppendExtraCommandLineSwitches(base::CommandLine* command_line, void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override; int child_process_id) override;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
......
...@@ -64,10 +64,10 @@ void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( ...@@ -64,10 +64,10 @@ void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams(
network::mojom::NetworkContextParams* network_context_params, network::mojom::NetworkContextParams* network_context_params,
const std::string& user_agent) { const std::string& user_agent) {
network_context_params->user_agent = user_agent; network_context_params->user_agent = user_agent;
#if defined(OS_LINUX) || defined(OS_WIN) #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
// We're not configuring the cookie encryption on these platforms yet. // We're not configuring the cookie encryption on these platforms yet.
network_context_params->enable_encrypted_cookies = false; network_context_params->enable_encrypted_cookies = false;
#endif #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
} }
SystemNetworkContextManager::SystemNetworkContextManager( SystemNetworkContextManager::SystemNetworkContextManager(
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#if defined(OS_WIN) #if defined(OS_WIN)
#include "base/base_paths_win.h" #include "base/base_paths_win.h"
#elif defined(OS_LINUX) #elif defined(OS_LINUX) || defined(OS_CHROMEOS)
#include "base/nix/xdg_util.h" #include "base/nix/xdg_util.h"
#endif #endif
...@@ -35,7 +35,7 @@ bool GetDefaultUserDataDirectory(base::FilePath* result) { ...@@ -35,7 +35,7 @@ bool GetDefaultUserDataDirectory(base::FilePath* result) {
return false; return false;
*result = result->AppendASCII("weblayer"); *result = result->AppendASCII("weblayer");
return true; return true;
#elif defined(OS_LINUX) #elif defined(OS_LINUX) || defined(OS_CHROMEOS)
std::unique_ptr<base::Environment> env(base::Environment::Create()); std::unique_ptr<base::Environment> env(base::Environment::Create());
base::FilePath config_dir(base::nix::GetXDGDirectory( base::FilePath config_dir(base::nix::GetXDGDirectory(
env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir)); env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment