[jumbo] Resolve symbol clashes in content/shell
Rename two TestServiceImpl to not clash in jumbo build experiments, and change a kIllegalString constant to be shared. Bug: 886902 Change-Id: I513e0641834476bb198cf24d71ef088634458313 Reviewed-on: https://chromium-review.googlesource.com/1233709 Reviewed-by: Peter Beverloo <peter@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#593125}
This commit is contained in:

committed by
Commit Bot

parent
90815d42b4
commit
74789b0b5e
content/shell
@@ -44,15 +44,15 @@ namespace content {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// A test service which can be driven by browser tests for various reasons.
|
// A test service which can be driven by browser tests for various reasons.
|
||||||
class TestServiceImpl : public mojom::TestService {
|
class TestRendererServiceImpl : public mojom::TestService {
|
||||||
public:
|
public:
|
||||||
explicit TestServiceImpl(mojom::TestServiceRequest request)
|
explicit TestRendererServiceImpl(mojom::TestServiceRequest request)
|
||||||
: binding_(this, std::move(request)) {
|
: binding_(this, std::move(request)) {
|
||||||
binding_.set_connection_error_handler(base::BindOnce(
|
binding_.set_connection_error_handler(base::BindOnce(
|
||||||
&TestServiceImpl::OnConnectionError, base::Unretained(this)));
|
&TestRendererServiceImpl::OnConnectionError, base::Unretained(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
~TestServiceImpl() override {}
|
~TestRendererServiceImpl() override {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnConnectionError() { delete this; }
|
void OnConnectionError() { delete this; }
|
||||||
@@ -93,12 +93,12 @@ class TestServiceImpl : public mojom::TestService {
|
|||||||
|
|
||||||
mojo::Binding<mojom::TestService> binding_;
|
mojo::Binding<mojom::TestService> binding_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(TestServiceImpl);
|
DISALLOW_COPY_AND_ASSIGN(TestRendererServiceImpl);
|
||||||
};
|
};
|
||||||
|
|
||||||
void CreateTestService(mojom::TestServiceRequest request) {
|
void CreateRendererTestService(mojom::TestServiceRequest request) {
|
||||||
// Owns itself.
|
// Owns itself.
|
||||||
new TestServiceImpl(std::move(request));
|
new TestRendererServiceImpl(std::move(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -113,7 +113,8 @@ void ShellContentRendererClient::RenderThreadStarted() {
|
|||||||
|
|
||||||
auto registry = std::make_unique<service_manager::BinderRegistry>();
|
auto registry = std::make_unique<service_manager::BinderRegistry>();
|
||||||
registry->AddInterface<mojom::TestService>(
|
registry->AddInterface<mojom::TestService>(
|
||||||
base::Bind(&CreateTestService), base::ThreadTaskRunnerHandle::Get());
|
base::Bind(&CreateRendererTestService),
|
||||||
|
base::ThreadTaskRunnerHandle::Get());
|
||||||
registry->AddInterface<mojom::PowerMonitorTest>(
|
registry->AddInterface<mojom::PowerMonitorTest>(
|
||||||
base::Bind(&PowerMonitorTestImpl::MakeStrongBinding,
|
base::Bind(&PowerMonitorTestImpl::MakeStrongBinding,
|
||||||
base::Passed(std::make_unique<PowerMonitorTestImpl>())),
|
base::Passed(std::make_unique<PowerMonitorTestImpl>())),
|
||||||
|
@@ -24,7 +24,6 @@ const char file_test_prefix[] = "(file test):";
|
|||||||
const char data_url_pattern[] = "data:";
|
const char data_url_pattern[] = "data:";
|
||||||
const std::string::size_type data_url_pattern_size =
|
const std::string::size_type data_url_pattern_size =
|
||||||
sizeof(data_url_pattern) - 1;
|
sizeof(data_url_pattern) - 1;
|
||||||
const char* kIllegalString = "illegal value";
|
|
||||||
const char* kPolicyIgnore = "Ignore";
|
const char* kPolicyIgnore = "Ignore";
|
||||||
const char* kPolicyDownload = "download";
|
const char* kPolicyDownload = "download";
|
||||||
const char* kPolicyCurrentTab = "current tab";
|
const char* kPolicyCurrentTab = "current tab";
|
||||||
@@ -35,6 +34,8 @@ const char* kPolicyNewPopup = "new popup";
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
const char* kIllegalString = "illegal value";
|
||||||
|
|
||||||
std::string NormalizeLayoutTestURL(const std::string& url) {
|
std::string NormalizeLayoutTestURL(const std::string& url) {
|
||||||
std::string result = url;
|
std::string result = url;
|
||||||
size_t pos;
|
size_t pos;
|
||||||
|
@@ -17,6 +17,8 @@ class GURL;
|
|||||||
|
|
||||||
namespace test_runner {
|
namespace test_runner {
|
||||||
|
|
||||||
|
extern const char* kIllegalString;
|
||||||
|
|
||||||
inline bool IsASCIIAlpha(char ch) {
|
inline bool IsASCIIAlpha(char ch) {
|
||||||
return base::IsAsciiLower(ch | 0x20);
|
return base::IsAsciiLower(ch | 0x20);
|
||||||
}
|
}
|
||||||
|
@@ -144,7 +144,6 @@ const char* kBackForwardString = "back/forward";
|
|||||||
const char* kReloadString = "reload";
|
const char* kReloadString = "reload";
|
||||||
const char* kFormResubmittedString = "form resubmitted";
|
const char* kFormResubmittedString = "form resubmitted";
|
||||||
const char* kOtherString = "other";
|
const char* kOtherString = "other";
|
||||||
const char* kIllegalString = "illegal value";
|
|
||||||
|
|
||||||
// Get a debugging string from a WebNavigationType.
|
// Get a debugging string from a WebNavigationType.
|
||||||
const char* WebNavigationTypeToString(blink::WebNavigationType type) {
|
const char* WebNavigationTypeToString(blink::WebNavigationType type) {
|
||||||
|
@@ -35,10 +35,10 @@ namespace content {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class TestServiceImpl : public mojom::TestService {
|
class TestUtilityServiceImpl : public mojom::TestService {
|
||||||
public:
|
public:
|
||||||
static void Create(mojom::TestServiceRequest request) {
|
static void Create(mojom::TestServiceRequest request) {
|
||||||
mojo::MakeStrongBinding(base::WrapUnique(new TestServiceImpl),
|
mojo::MakeStrongBinding(base::WrapUnique(new TestUtilityServiceImpl),
|
||||||
std::move(request));
|
std::move(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,9 +80,9 @@ class TestServiceImpl : public mojom::TestService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit TestServiceImpl() {}
|
explicit TestUtilityServiceImpl() {}
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(TestServiceImpl);
|
DISALLOW_COPY_AND_ASSIGN(TestUtilityServiceImpl);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unique_ptr<service_manager::Service> CreateTestService() {
|
std::unique_ptr<service_manager::Service> CreateTestService() {
|
||||||
@@ -105,7 +105,7 @@ ShellContentUtilityClient::~ShellContentUtilityClient() {
|
|||||||
|
|
||||||
void ShellContentUtilityClient::UtilityThreadStarted() {
|
void ShellContentUtilityClient::UtilityThreadStarted() {
|
||||||
auto registry = std::make_unique<service_manager::BinderRegistry>();
|
auto registry = std::make_unique<service_manager::BinderRegistry>();
|
||||||
registry->AddInterface(base::BindRepeating(&TestServiceImpl::Create),
|
registry->AddInterface(base::BindRepeating(&TestUtilityServiceImpl::Create),
|
||||||
base::ThreadTaskRunnerHandle::Get());
|
base::ThreadTaskRunnerHandle::Get());
|
||||||
registry->AddInterface<mojom::PowerMonitorTest>(
|
registry->AddInterface<mojom::PowerMonitorTest>(
|
||||||
base::BindRepeating(
|
base::BindRepeating(
|
||||||
|
Reference in New Issue
Block a user