| Index: content/public/common/content_client.cc
|
| diff --git a/content/public/common/content_client.cc b/content/public/common/content_client.cc
|
| index 9558e2ddd700566e0593dbc85c6afe1031c50758..ae252120d3653623eb01b878305f8c7f47fe36c6 100644
|
| --- a/content/public/common/content_client.cc
|
| +++ b/content/public/common/content_client.cc
|
| @@ -16,17 +16,11 @@ static ContentClient* g_client;
|
| void SetContentClient(ContentClient* client) {
|
| g_client = client;
|
|
|
| - // TODO(dpranke): Doing real work (calling webkit_glue::SetUserAgent)
|
| - // inside what looks like a function that initializes a global is a
|
| - // bit odd, but we need to make sure this is done before
|
| - // webkit_glue::GetUserAgent() is called (so that the UA doesn't change).
|
| - //
|
| - // It would be cleaner if we could rename this to something like a
|
| - // content::Initialize(). Maybe we can merge this into ContentMain() somehow?
|
| + // Set the default user agent as provided by the client. We need to make
|
| + // sure this is done before webkit_glue::GetUserAgent() is called (so that
|
| + // the UA doesn't change).
|
| if (client) {
|
| - bool custom = false;
|
| - std::string ua = client->GetUserAgent(&custom);
|
| - webkit_glue::SetUserAgent(ua, custom);
|
| + webkit_glue::SetUserAgent(client->GetUserAgent(), false);
|
| }
|
| }
|
|
|
|
|