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

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.cc

Issue 2658603003: ServiceWorker: Enable UseCounter for ServiceWorkerGlobalScope (Closed)
Patch Set: ready to review Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/service_worker/service_worker_context_client.h" 5 #include "content/renderer/service_worker/service_worker_context_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } 601 }
602 602
603 // Now we should be able to free the WebEmbeddedWorker container on the 603 // Now we should be able to free the WebEmbeddedWorker container on the
604 // main thread. 604 // main thread.
605 main_thread_task_runner_->PostTask( 605 main_thread_task_runner_->PostTask(
606 FROM_HERE, 606 FROM_HERE,
607 base::Bind(&CallWorkerContextDestroyedOnMainThread, 607 base::Bind(&CallWorkerContextDestroyedOnMainThread,
608 embedded_worker_id_)); 608 embedded_worker_id_));
609 } 609 }
610 610
611 void ServiceWorkerContextClient::countFeature(uint32_t feature) {
612 Send(new EmbeddedWorkerHostMsg_CountFeature(service_worker_version_id_,
613 feature));
614 }
615
611 void ServiceWorkerContextClient::reportException( 616 void ServiceWorkerContextClient::reportException(
612 const blink::WebString& error_message, 617 const blink::WebString& error_message,
613 int line_number, 618 int line_number,
614 int column_number, 619 int column_number,
615 const blink::WebString& source_url) { 620 const blink::WebString& source_url) {
616 Send(new EmbeddedWorkerHostMsg_ReportException( 621 Send(new EmbeddedWorkerHostMsg_ReportException(
617 embedded_worker_id_, error_message.utf16(), line_number, column_number, 622 embedded_worker_id_, error_message.utf16(), line_number, column_number,
618 blink::WebStringToGURL(source_url))); 623 blink::WebStringToGURL(source_url)));
619 } 624 }
620 625
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1260 }
1256 1261
1257 base::WeakPtr<ServiceWorkerContextClient> 1262 base::WeakPtr<ServiceWorkerContextClient>
1258 ServiceWorkerContextClient::GetWeakPtr() { 1263 ServiceWorkerContextClient::GetWeakPtr() {
1259 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); 1264 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread());
1260 DCHECK(context_); 1265 DCHECK(context_);
1261 return context_->weak_factory.GetWeakPtr(); 1266 return context_->weak_factory.GetWeakPtr();
1262 } 1267 }
1263 1268
1264 } // namespace content 1269 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698