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

Unified Diff: content/child/service_worker/service_worker_provider_context.cc

Issue 1851933002: Convert //url to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup 7 Created 4 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/child/service_worker/service_worker_provider_context.cc
diff --git a/content/child/service_worker/service_worker_provider_context.cc b/content/child/service_worker/service_worker_provider_context.cc
index 9ff307e8ec6978561932d5c6499e7ef23f97380c..9aa1e16b4b21b0e56eedff88995ed8b4ee1d6e0f 100644
--- a/content/child/service_worker/service_worker_provider_context.cc
+++ b/content/child/service_worker/service_worker_provider_context.cc
@@ -21,16 +21,16 @@ class ServiceWorkerProviderContext::Delegate {
public:
virtual ~Delegate(){};
virtual void AssociateRegistration(
- scoped_ptr<ServiceWorkerRegistrationHandleReference> registration,
- scoped_ptr<ServiceWorkerHandleReference> installing,
- scoped_ptr<ServiceWorkerHandleReference> waiting,
- scoped_ptr<ServiceWorkerHandleReference> active) = 0;
+ std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration,
+ std::unique_ptr<ServiceWorkerHandleReference> installing,
+ std::unique_ptr<ServiceWorkerHandleReference> waiting,
+ std::unique_ptr<ServiceWorkerHandleReference> active) = 0;
virtual void DisassociateRegistration() = 0;
virtual void GetAssociatedRegistration(
ServiceWorkerRegistrationObjectInfo* info,
ServiceWorkerVersionAttributes* attrs) = 0;
virtual void SetController(
- scoped_ptr<ServiceWorkerHandleReference> controller) = 0;
+ std::unique_ptr<ServiceWorkerHandleReference> controller) = 0;
virtual ServiceWorkerHandleReference* controller() = 0;
};
@@ -44,10 +44,10 @@ class ServiceWorkerProviderContext::ControlleeDelegate
~ControlleeDelegate() override {}
void AssociateRegistration(
- scoped_ptr<ServiceWorkerRegistrationHandleReference> registration,
- scoped_ptr<ServiceWorkerHandleReference> installing,
- scoped_ptr<ServiceWorkerHandleReference> waiting,
- scoped_ptr<ServiceWorkerHandleReference> active) override {
+ std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration,
+ std::unique_ptr<ServiceWorkerHandleReference> installing,
+ std::unique_ptr<ServiceWorkerHandleReference> waiting,
+ std::unique_ptr<ServiceWorkerHandleReference> active) override {
DCHECK(!registration_);
registration_ = std::move(registration);
}
@@ -58,7 +58,7 @@ class ServiceWorkerProviderContext::ControlleeDelegate
}
void SetController(
- scoped_ptr<ServiceWorkerHandleReference> controller) override {
+ std::unique_ptr<ServiceWorkerHandleReference> controller) override {
DCHECK(registration_);
DCHECK(!controller ||
controller->handle_id() != kInvalidServiceWorkerHandleId);
@@ -76,8 +76,8 @@ class ServiceWorkerProviderContext::ControlleeDelegate
}
private:
- scoped_ptr<ServiceWorkerRegistrationHandleReference> registration_;
- scoped_ptr<ServiceWorkerHandleReference> controller_;
+ std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration_;
+ std::unique_ptr<ServiceWorkerHandleReference> controller_;
DISALLOW_COPY_AND_ASSIGN(ControlleeDelegate);
};
@@ -91,10 +91,10 @@ class ServiceWorkerProviderContext::ControllerDelegate
~ControllerDelegate() override {}
void AssociateRegistration(
- scoped_ptr<ServiceWorkerRegistrationHandleReference> registration,
- scoped_ptr<ServiceWorkerHandleReference> installing,
- scoped_ptr<ServiceWorkerHandleReference> waiting,
- scoped_ptr<ServiceWorkerHandleReference> active) override {
+ std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration,
+ std::unique_ptr<ServiceWorkerHandleReference> installing,
+ std::unique_ptr<ServiceWorkerHandleReference> waiting,
+ std::unique_ptr<ServiceWorkerHandleReference> active) override {
DCHECK(!registration_);
registration_ = std::move(registration);
installing_ = std::move(installing);
@@ -108,7 +108,7 @@ class ServiceWorkerProviderContext::ControllerDelegate
}
void SetController(
- scoped_ptr<ServiceWorkerHandleReference> controller) override {
+ std::unique_ptr<ServiceWorkerHandleReference> controller) override {
NOTREACHED();
}
@@ -131,10 +131,10 @@ class ServiceWorkerProviderContext::ControllerDelegate
}
private:
- scoped_ptr<ServiceWorkerRegistrationHandleReference> registration_;
- scoped_ptr<ServiceWorkerHandleReference> installing_;
- scoped_ptr<ServiceWorkerHandleReference> waiting_;
- scoped_ptr<ServiceWorkerHandleReference> active_;
+ std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration_;
+ std::unique_ptr<ServiceWorkerHandleReference> installing_;
+ std::unique_ptr<ServiceWorkerHandleReference> waiting_;
+ std::unique_ptr<ServiceWorkerHandleReference> active_;
DISALLOW_COPY_AND_ASSIGN(ControllerDelegate);
};
@@ -166,10 +166,10 @@ ServiceWorkerProviderContext::~ServiceWorkerProviderContext() {
}
void ServiceWorkerProviderContext::OnAssociateRegistration(
- scoped_ptr<ServiceWorkerRegistrationHandleReference> registration,
- scoped_ptr<ServiceWorkerHandleReference> installing,
- scoped_ptr<ServiceWorkerHandleReference> waiting,
- scoped_ptr<ServiceWorkerHandleReference> active) {
+ std::unique_ptr<ServiceWorkerRegistrationHandleReference> registration,
+ std::unique_ptr<ServiceWorkerHandleReference> installing,
+ std::unique_ptr<ServiceWorkerHandleReference> waiting,
+ std::unique_ptr<ServiceWorkerHandleReference> active) {
DCHECK(main_thread_task_runner_->RunsTasksOnCurrentThread());
delegate_->AssociateRegistration(std::move(registration),
std::move(installing), std::move(waiting),
@@ -182,7 +182,7 @@ void ServiceWorkerProviderContext::OnDisassociateRegistration() {
}
void ServiceWorkerProviderContext::OnSetControllerServiceWorker(
- scoped_ptr<ServiceWorkerHandleReference> controller) {
+ std::unique_ptr<ServiceWorkerHandleReference> controller) {
DCHECK(main_thread_task_runner_->RunsTasksOnCurrentThread());
delegate_->SetController(std::move(controller));
}
« no previous file with comments | « content/child/service_worker/service_worker_provider_context.h ('k') | content/child/webblobregistry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698