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

Unified Diff: content/browser/notifications/platform_notification_context_impl.h

Issue 1024463006: Destroy the notification database when corruption occurs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-SWContextObserver
Patch Set: rebase Created 5 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
« no previous file with comments | « no previous file | content/browser/notifications/platform_notification_context_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/notifications/platform_notification_context_impl.h
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index 944b26a62f8cc40b3a6c8d85102b7cc78ec9355e..757d22e42b130377f72f5d10461b59cca4072186 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -66,6 +66,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
// ServiceWorkerContextObserver implementation.
void OnRegistrationDeleted(int64_t registration_id,
const GURL& pattern) override;
+ void OnStorageWiped() override;
private:
friend class base::DeleteHelper<PlatformNotificationContextImpl>;
@@ -119,6 +120,11 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
const GURL& origin,
int64_t service_worker_registration_id);
+ // Destroys the database regardless of its initialization status. This method
+ // must only be called on the |task_runner_| thread. Returns if the directory
+ // the database was stored in could be emptied.
+ bool DestroyDatabase();
+
// Returns the path in which the database should be initialized. May be empty.
base::FilePath GetDatabasePath() const;
« no previous file with comments | « no previous file | content/browser/notifications/platform_notification_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698