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

Unified Diff: content/browser/service_worker/service_worker_version.cc

Issue 672813002: [ServiceWorker] Added size deltas and total size computation for QuotaM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed last comment Created 6 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_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 62a6a6029ff47545d29b5f3434101158c090118e..24be98245493c7ccbdd81067fc9e543070168399 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -98,6 +98,7 @@ ServiceWorkerVersion::ServiceWorkerVersion(
registration_id_(kInvalidServiceWorkerVersionId),
script_url_(script_url),
status_(NEW),
+ resources_total_size_bytes_(0),
context_(context),
script_cache_map_(this, context),
is_doomed_(false),
@@ -107,6 +108,7 @@ ServiceWorkerVersion::ServiceWorkerVersion(
if (registration) {
registration_id_ = registration->id();
scope_ = registration->pattern();
+ set_resources_total_size_bytes(registration->resources_total_size_bytes());
}
context_->AddLiveVersion(this);
embedded_worker_ = context_->embedded_worker_registry()->CreateWorker();
@@ -154,7 +156,8 @@ ServiceWorkerVersionInfo ServiceWorkerVersion::GetInfo() {
version_id(),
embedded_worker()->process_id(),
embedded_worker()->thread_id(),
- embedded_worker()->worker_devtools_agent_route_id());
+ embedded_worker()->worker_devtools_agent_route_id(),
+ resources_total_size_bytes_);
}
void ServiceWorkerVersion::StartWorker(const StatusCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698