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

Unified Diff: content/browser/service_worker/service_worker_job_coordinator.h

Issue 2441643002: Remove stl_util's deletion function use from content/browser/service_worker. (Closed)
Patch Set: add a move constructor Created 4 years, 2 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/browser/service_worker/service_worker_job_coordinator.h
diff --git a/content/browser/service_worker/service_worker_job_coordinator.h b/content/browser/service_worker/service_worker_job_coordinator.h
index 23e48abf0d668aa1f6c488a3d5c9b9ea3ec2e0f1..2f5e9a7a74df1b387d20dde769b3b8de87ff5c88 100644
--- a/content/browser/service_worker/service_worker_job_coordinator.h
+++ b/content/browser/service_worker/service_worker_job_coordinator.h
@@ -7,6 +7,7 @@
#include <deque>
#include <map>
+#include <memory>
#include "base/macros.h"
#include "content/browser/service_worker/service_worker_register_job.h"
@@ -56,7 +57,7 @@ class CONTENT_EXPORT ServiceWorkerJobCoordinator {
class JobQueue {
public:
JobQueue();
- JobQueue(const JobQueue& other);
+ JobQueue(JobQueue&&);
~JobQueue();
// Adds a job to the queue. If an identical job is already at the end of the
@@ -87,15 +88,15 @@ class CONTENT_EXPORT ServiceWorkerJobCoordinator {
void ClearForShutdown();
private:
- std::deque<ServiceWorkerRegisterJobBase*> jobs_;
- };
+ std::deque<std::unique_ptr<ServiceWorkerRegisterJobBase>> jobs_;
- typedef std::map<GURL, JobQueue> RegistrationJobMap;
+ DISALLOW_COPY_AND_ASSIGN(JobQueue);
+ };
// The ServiceWorkerContextCore object should always outlive the
// job coordinator, the core owns the coordinator.
base::WeakPtr<ServiceWorkerContextCore> context_;
- RegistrationJobMap job_queues_;
+ std::map<GURL, JobQueue> job_queues_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerJobCoordinator);
};

Powered by Google App Engine
This is Rietveld 408576698