Fix API changes in DevToolsManagerDelegate.

This commit is contained in:
Haojian Wu 2015-07-23 18:18:03 +08:00 committed by Cheng Zhao
parent 2dd8bc0c78
commit 7d22da5169
4 changed files with 48 additions and 116 deletions

View file

@ -14,6 +14,17 @@
namespace brightray {
std::string GetProductInternal() {
auto name = GetApplicationName();
base::RemoveChars(name, base::kWhitespaceASCII, &name);
return base::StringPrintf("%s/%s",
name.c_str(), GetApplicationVersion().c_str());
}
std::string GetBrightrayUserAgent() {
return content::BuildUserAgentFromProduct(GetProductInternal());
}
ContentClient::ContentClient() {
}
@ -21,14 +32,11 @@ ContentClient::~ContentClient() {
}
std::string ContentClient::GetProduct() const {
auto name = GetApplicationName();
base::RemoveChars(name, base::kWhitespaceASCII, &name);
return base::StringPrintf("%s/%s",
name.c_str(), GetApplicationVersion().c_str());
return GetProductInternal();
}
std::string ContentClient::GetUserAgent() const {
return content::BuildUserAgentFromProduct(GetProduct());
return GetBrightrayUserAgent();
}
base::string16 ContentClient::GetLocalizedString(int message_id) const {