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

Unified Diff: extensions/browser/extension_prefs.h

Issue 221933013: Show a notification when an ephemeral app consumes excessive disk space (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webkit_storage_monitor
Patch Set: Fix test failures Created 6 years, 8 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: extensions/browser/extension_prefs.h
diff --git a/extensions/browser/extension_prefs.h b/extensions/browser/extension_prefs.h
index 87ff2172bcfe444e23eee112eff0511918c98d2f..4ff16a578adacb50652c5f78c72d815e16620099 100644
--- a/extensions/browser/extension_prefs.h
+++ b/extensions/browser/extension_prefs.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/basictypes.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
@@ -544,6 +545,19 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService {
void SetInstallParam(const std::string& extension_id,
const std::string& install_parameter);
+ // Gets/sets the next threshold for displaying a notification if an extension
+ // or app consumes excessive disk space. Returns 0 if the initial threshold
+ // has not yet been reached.
+ int64 GetNextStorageThreshold(const std::string& extension_id) const;
+ void SetNextStorageThreshold(const std::string& extension_id,
+ int64 next_threshold);
+
+ // Gets/sets whether notifications should be shown if an extension or app
+ // consumes too much disk space.
+ bool IsStorageNotificationEnabled(const std::string& extension_id) const;
+ void SetStorageNotificationEnabled(const std::string& extension_id,
+ bool enable_notifications);
+
private:
friend class ExtensionPrefsBlacklistedExtensions; // Unit test.
friend class ExtensionPrefsUninstallExtension; // Unit test.
« no previous file with comments | « chrome/test/data/extensions/storage_monitor/write_data/manifest.json ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698