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

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

Issue 1152543002: ServiceWorker: Migrate the script cache backend from BlockFile to Simple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporate falken@'s comments Created 5 years, 6 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_disk_cache_migrator.h
diff --git a/content/browser/service_worker/service_worker_disk_cache_migrator.h b/content/browser/service_worker/service_worker_disk_cache_migrator.h
index 283db71a4abfde10662b44ed6874650eb704b2b3..cbf16e24f8fad5c3967893481a2f1e813b8f89cc 100644
--- a/content/browser/service_worker/service_worker_disk_cache_migrator.h
+++ b/content/browser/service_worker/service_worker_disk_cache_migrator.h
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_MIGRATOR_H_
+#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_MIGRATOR_H_
+
#include "content/browser/service_worker/service_worker_disk_cache.h"
#include "base/id_map.h"
@@ -31,7 +34,9 @@ class CONTENT_EXPORT ServiceWorkerDiskCacheMigrator {
void Start(const StatusCallback& callback);
private:
- friend class ServiceWorkerDiskCacheMigratorTest;
+ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDiskCacheMigratorTest,
+ ThrottleInflightTasks);
+
class Task;
class WrappedEntry;
@@ -59,6 +64,9 @@ class CONTENT_EXPORT ServiceWorkerDiskCacheMigrator {
scoped_ptr<Task> pending_task_;
size_t max_number_of_inflight_tasks_ = 10;
+ base::TimeTicks start_time_;
+ size_t number_of_migrated_resources_ = 0;
+
StatusCallback callback_;
base::WeakPtrFactory<ServiceWorkerDiskCacheMigrator> weak_factory_;
@@ -67,3 +75,5 @@ class CONTENT_EXPORT ServiceWorkerDiskCacheMigrator {
};
} // namespace content
+
+#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISK_CACHE_MIGRATOR_H_

Powered by Google App Engine
This is Rietveld 408576698