Commit 59123b61 authored by xhwang's avatar xhwang Committed by Commit bot

media: Fix ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS check

Replace

 if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)

with

 if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)

The former was working because some compilers predefine FOO to be 1 when
-DFOO is specified. For example:
https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html

But I am not sure whether this is true for all compilers. Hence we
probably should not depend on it.

Long term, we should switch to use BUILDFLAG to avoid this.

TBR=mkwst@chromium.org
BUG=596252

Review-Url: https://codereview.chromium.org/2616703005
Cr-Commit-Position: refs/heads/master@{#441782}
parent 5ae4d2d5
......@@ -3054,7 +3054,7 @@ void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
void ChromeContentBrowserClient::RegisterInProcessServices(
StaticServiceMap* services) {
#if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
#if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
content::ServiceInfo info;
info.factory = base::Bind(&media::CreateMediaService);
services->insert(std::make_pair("media", info));
......
......@@ -196,7 +196,7 @@ bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {
void ShellContentBrowserClient::RegisterInProcessServices(
StaticServiceMap* services) {
#if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
#if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
{
content::ServiceInfo info;
info.factory = base::Bind(&media::CreateMediaServiceForTesting);
......
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