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

Unified Diff: trunk/src/content/renderer/service_worker/embedded_worker_dispatcher.cc

Issue 192283002: Revert 255858 "Simplify the user agent code some more since afte..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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: trunk/src/content/renderer/service_worker/embedded_worker_dispatcher.cc
===================================================================
--- trunk/src/content/renderer/service_worker/embedded_worker_dispatcher.cc (revision 255866)
+++ trunk/src/content/renderer/service_worker/embedded_worker_dispatcher.cc (working copy)
@@ -12,13 +12,13 @@
#include "content/child/thread_safe_sender.h"
#include "content/child/worker_task_runner.h"
#include "content/common/service_worker/embedded_worker_messages.h"
-#include "content/public/common/content_client.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/service_worker/embedded_worker_context_client.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebEmbeddedWorker.h"
#include "third_party/WebKit/public/web/WebEmbeddedWorkerStartData.h"
+#include "webkit/common/user_agent/user_agent.h"
namespace content {
@@ -73,7 +73,8 @@
blink::WebEmbeddedWorkerStartData start_data;
start_data.scriptURL = script_url;
- start_data.userAgent = base::UTF8ToUTF16(GetContentClient()->GetUserAgent());
+ start_data.userAgent =
+ base::UTF8ToUTF16(webkit_glue::GetUserAgent(script_url));
start_data.startMode = blink::WebEmbeddedWorkerStartModeDontPauseOnStart;
wrapper->worker()->startWorkerContext(start_data);

Powered by Google App Engine
This is Rietveld 408576698