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

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

Issue 300703003: ServiceWorker: Consolidate database state members for cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_database.h
diff --git a/content/browser/service_worker/service_worker_database.h b/content/browser/service_worker/service_worker_database.h
index 658ddc0c2f228cde3494cdcaa1fb365fda3a0d83..04ed317b413b6f6e8aa6d0d2618d0f15c24ce28d 100644
--- a/content/browser/service_worker/service_worker_database.h
+++ b/content/browser/service_worker/service_worker_database.h
@@ -180,9 +180,6 @@ class CONTENT_EXPORT ServiceWorkerDatabase {
const GURL& origin,
std::vector<int64>* newly_purgeable_resources);
- bool is_disabled() const { return is_disabled_; }
- bool was_corruption_detected() const { return was_corruption_detected_; }
-
private:
// Opens the database at the |path_|. This is lazily called when the first
// database API is called. Returns OK if the database is successfully opened.
@@ -276,16 +273,12 @@ class CONTENT_EXPORT ServiceWorkerDatabase {
int64 next_avail_resource_id_;
int64 next_avail_version_id_;
- // True if a database error has occurred (e.g. cannot read data).
- // If true, all database accesses will fail.
- bool is_disabled_;
-
- // True if a database corruption was detected.
- bool was_corruption_detected_;
-
- // True if a database was initialized, that is, the schema version was written
- // in the database.
- bool is_initialized_;
+ enum State {
+ UNINITIALIZED,
+ INITIALIZED,
+ DISABLED,
+ };
+ State state_;
base::SequenceChecker sequence_checker_;
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698