Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: content/public/common/content_client.cc

Issue 9623027: Move --user-agent overriding logic from chrome into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: fix indent Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..feb53f0025d2cf31925a7f14ea769f4d067395b1 100644
--- a/content/public/common/content_client.cc
+++ b/content/public/common/content_client.cc
@@ -15,19 +15,6 @@ 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?
- if (client) {
- bool custom = false;
- std::string ua = client->GetUserAgent(&custom);
- webkit_glue::SetUserAgent(ua, custom);
- }
}
ContentClient* GetContentClient() {

Powered by Google App Engine
This is Rietveld 408576698