Commit c2688275 authored by Jens Widell's avatar Jens Widell Committed by Commit Bot

Rename conflicting `g_client` variables in anonymous namespace

They conflict in jumbo/unity builds.

Change-Id: Ie5eae8aa303f5a163eabb74ff931f696127ff032
Reviewed-on: https://chromium-review.googlesource.com/897602Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534005}
parent 8d0135f1
...@@ -10,27 +10,27 @@ namespace extensions { ...@@ -10,27 +10,27 @@ namespace extensions {
namespace { namespace {
AppWindowClient* g_client = nullptr; AppWindowClient* g_app_window_client = nullptr;
} // namespace } // namespace
AppWindowClient* AppWindowClient::Get() { AppWindowClient* AppWindowClient::Get() {
return g_client; return g_app_window_client;
} }
void AppWindowClient::Set(AppWindowClient* client) { void AppWindowClient::Set(AppWindowClient* client) {
// Unit tests that set the AppWindowClient should clear it afterward. // Unit tests that set the AppWindowClient should clear it afterward.
if (g_client && client) { if (g_app_window_client && client) {
// Rarely, a test may run multiple BrowserProcesses in a single process: // Rarely, a test may run multiple BrowserProcesses in a single process:
// crbug.com/751242. This will lead to redundant calls, but the pointers // crbug.com/751242. This will lead to redundant calls, but the pointers
// should at least be the same. // should at least be the same.
DCHECK_EQ(g_client, client) DCHECK_EQ(g_app_window_client, client)
<< "AppWindowClient::Set called with different non-null pointers twice " << "AppWindowClient::Set called with different non-null pointers twice "
<< "in a row. A previous test may have set this without clearing it."; << "in a row. A previous test may have set this without clearing it.";
return; return;
} }
g_client = client; g_app_window_client = client;
} }
} // namespace extensions } // namespace extensions
...@@ -13,7 +13,7 @@ namespace extensions { ...@@ -13,7 +13,7 @@ namespace extensions {
namespace { namespace {
ExtensionsBrowserClient* g_client = NULL; ExtensionsBrowserClient* g_extension_browser_client = NULL;
} // namespace } // namespace
...@@ -59,11 +59,11 @@ bool ExtensionsBrowserClient::IsExtensionEnabled( ...@@ -59,11 +59,11 @@ bool ExtensionsBrowserClient::IsExtensionEnabled(
} }
ExtensionsBrowserClient* ExtensionsBrowserClient::Get() { ExtensionsBrowserClient* ExtensionsBrowserClient::Get() {
return g_client; return g_extension_browser_client;
} }
void ExtensionsBrowserClient::Set(ExtensionsBrowserClient* client) { void ExtensionsBrowserClient::Set(ExtensionsBrowserClient* client) {
g_client = client; g_extension_browser_client = client;
} }
} // namespace extensions } // namespace extensions
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