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

Unified Diff: extensions/browser/extension_prefs.cc

Issue 314563003: Handle promotion of ephemeral apps in the ExtensionStorageMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit in comment Created 6 years, 6 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 | « extensions/browser/extension_prefs.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_prefs.cc
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc
index 665d3643e97aac1e46971c35c310648bd4a0e16f..fdba64a6fffec0ecffecf1236e1f2d75c3437d16 100644
--- a/extensions/browser/extension_prefs.cc
+++ b/extensions/browser/extension_prefs.cc
@@ -194,15 +194,6 @@ const char kPrefInstallParam[] = "install_parameter";
// A list of installed ids and a signature.
const char kInstallSignature[] = "extensions.install_signature";
-// A preference that stores the next threshold for displaying a notification
-// when an extension or app consumes excessive disk space. This will not be
-// set until the extension/app reaches the initial threshold.
-const char kPrefNextStorageThreshold[] = "next_storage_threshold";
-
-// If this preference is set to true, notifications will be suppressed when an
-// extension or app consumes excessive disk space.
-const char kPrefDisableStorageNotifications[] = "disable_storage_notifications";
-
// Provider of write access to a dictionary storing extension prefs.
class ScopedExtensionPrefUpdate : public DictionaryPrefUpdate {
public:
@@ -1939,44 +1930,6 @@ void ExtensionPrefs::SetInstallParam(const std::string& extension_id,
new base::StringValue(install_parameter));
}
-int64 ExtensionPrefs::GetNextStorageThreshold(
- const std::string& extension_id) const {
- int64 next_threshold;
- if (ReadInt64(GetExtensionPref(extension_id),
- kPrefNextStorageThreshold,
- &next_threshold)) {
- return next_threshold;
- }
-
- return 0;
-}
-
-void ExtensionPrefs::SetNextStorageThreshold(const std::string& extension_id,
- int64 next_threshold) {
- ScopedExtensionPrefUpdate update(prefs_, extension_id);
- SaveInt64(update.Get(), kPrefNextStorageThreshold, next_threshold);
-}
-
-bool ExtensionPrefs::IsStorageNotificationEnabled(
- const std::string& extension_id) const {
- bool disable_notifications;
- if (ReadPrefAsBoolean(extension_id,
- kPrefDisableStorageNotifications,
- &disable_notifications)) {
- return !disable_notifications;
- }
-
- return true;
-}
-
-void ExtensionPrefs::SetStorageNotificationEnabled(
- const std::string& extension_id, bool enable_notifications) {
- UpdateExtensionPref(
- extension_id,
- kPrefDisableStorageNotifications,
- enable_notifications ? NULL : new base::FundamentalValue(true));
-}
-
ExtensionPrefs::ExtensionPrefs(
PrefService* prefs,
const base::FilePath& root_dir,
« no previous file with comments | « extensions/browser/extension_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698