Commit 5db464c3 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Prepending switches by :: to not clash with safe_browsing::switches

There is both a ::safe_browsing::switches namespace and a ::switches
namespace. If you inside the safe_browsing namespace write |switches|
it will map to ::safe_browsing::switches if that namespace is known to
exist. In some jumbo builds where many cc files are compiled together
the compiler knows about that namespace and chooses it wrongly.

There is a style guide instruction to not use sub namespace names that
are identical to top level namespace names, probably for this reason,
so maybe all sub namespaces named |switches| should be given new
names, the same way that has already happened to some |features|
namespaces.

This patch is a small trivial fix, add a :: prefix to |switches| to
make it clear which |switches| namespace is intended.

Change-Id: I2f39ca26b2174455b94eeadd8b6cfb756248a6c9
Reviewed-on: https://chromium-review.googlesource.com/c/1278729Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#599595}
parent 760c4b55
...@@ -50,7 +50,7 @@ void ServicesDelegateImpl::InitializeCsdService( ...@@ -50,7 +50,7 @@ void ServicesDelegateImpl::InitializeCsdService(
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
#if defined(SAFE_BROWSING_CSD) #if defined(SAFE_BROWSING_CSD)
if (!base::CommandLine::ForCurrentProcess()->HasSwitch( if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableClientSidePhishingDetection)) { ::switches::kDisableClientSidePhishingDetection)) {
csd_service_.reset(ClientSideDetectionService::Create(url_loader_factory)); csd_service_.reset(ClientSideDetectionService::Create(url_loader_factory));
} }
#endif // defined(SAFE_BROWSING_CSD) #endif // defined(SAFE_BROWSING_CSD)
......
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