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

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

Issue 191093002: Simplify the user agent code some more since after r255534 it's not affected by the site's URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: patchset 15 which works 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: content/renderer/service_worker/embedded_worker_dispatcher.cc
===================================================================
--- content/renderer/service_worker/embedded_worker_dispatcher.cc (revision 255867)
+++ 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,8 +73,7 @@
blink::WebEmbeddedWorkerStartData start_data;
start_data.scriptURL = script_url;
- start_data.userAgent =
- base::UTF8ToUTF16(webkit_glue::GetUserAgent(script_url));
+ start_data.userAgent = base::UTF8ToUTF16(GetContentClient()->GetUserAgent());
start_data.startMode = blink::WebEmbeddedWorkerStartModeDontPauseOnStart;
wrapper->worker()->startWorkerContext(start_data);
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | content/test/test_webkit_platform_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698