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

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

Issue 2658603003: ServiceWorker: Enable UseCounter for ServiceWorkerGlobalScope (Closed)
Patch Set: int32_t -> uint32_t 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 608 }
609 609
610 // Now we should be able to free the WebEmbeddedWorker container on the 610 // Now we should be able to free the WebEmbeddedWorker container on the
611 // main thread. 611 // main thread.
612 main_thread_task_runner_->PostTask( 612 main_thread_task_runner_->PostTask(
613 FROM_HERE, 613 FROM_HERE,
614 base::Bind(&CallWorkerContextDestroyedOnMainThread, 614 base::Bind(&CallWorkerContextDestroyedOnMainThread,
615 embedded_worker_id_)); 615 embedded_worker_id_));
616 } 616 }
617 617
618 void ServiceWorkerContextClient::countFeature(uint32_t feature) {
619 Send(new EmbeddedWorkerHostMsg_CountFeature(service_worker_version_id_,
620 feature));
621 }
622
618 void ServiceWorkerContextClient::reportException( 623 void ServiceWorkerContextClient::reportException(
619 const blink::WebString& error_message, 624 const blink::WebString& error_message,
620 int line_number, 625 int line_number,
621 int column_number, 626 int column_number,
622 const blink::WebString& source_url) { 627 const blink::WebString& source_url) {
623 Send(new EmbeddedWorkerHostMsg_ReportException( 628 Send(new EmbeddedWorkerHostMsg_ReportException(
624 embedded_worker_id_, error_message.utf16(), line_number, column_number, 629 embedded_worker_id_, error_message.utf16(), line_number, column_number,
625 blink::WebStringToGURL(source_url))); 630 blink::WebStringToGURL(source_url)));
626 } 631 }
627 632
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 } 1283 }
1279 1284
1280 base::WeakPtr<ServiceWorkerContextClient> 1285 base::WeakPtr<ServiceWorkerContextClient>
1281 ServiceWorkerContextClient::GetWeakPtr() { 1286 ServiceWorkerContextClient::GetWeakPtr() {
1282 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); 1287 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread());
1283 DCHECK(context_); 1288 DCHECK(context_);
1284 return context_->weak_factory.GetWeakPtr(); 1289 return context_->weak_factory.GetWeakPtr();
1285 } 1290 }
1286 1291
1287 } // namespace content 1292 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698