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

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

Issue 188283003: Add ServiceWorkerVersion::status() (which is to be persisted unlike running status) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix after rebase Created 6 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/browser/service_worker/service_worker_storage.cc
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index 92af988515594d1e840563372f7d8acf2ec5ea25..0be7089ef05ccfe24f508a91810de7bfa20c3648 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -22,12 +22,13 @@ void RunSoon(const base::Closure& closure) {
const base::FilePath::CharType kServiceWorkerDirectory[] =
FILE_PATH_LITERAL("ServiceWorker");
-}
+} // namespace
ServiceWorkerStorage::ServiceWorkerStorage(
const base::FilePath& path,
quota::QuotaManagerProxy* quota_manager_proxy)
: last_registration_id_(0), // TODO(kinuko): this should be read from disk.
+ last_version_id_(0), // TODO(kinuko): this should be read from disk.
quota_manager_proxy_(quota_manager_proxy) {
if (!path.empty())
path_ = path.Append(kServiceWorkerDirectory);
@@ -116,6 +117,10 @@ int64 ServiceWorkerStorage::NewRegistrationId() {
return ++last_registration_id_;
}
+int64 ServiceWorkerStorage::NewVersionId() {
+ return ++last_version_id_;
+}
+
bool ServiceWorkerStorage::PatternMatches(const GURL& pattern,
const GURL& url) {
// This is a really basic, naive
« no previous file with comments | « content/browser/service_worker/service_worker_storage.h ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698