| Index: chrome/browser/extensions/extension_storage_monitor.cc
|
| diff --git a/chrome/browser/extensions/extension_storage_monitor.cc b/chrome/browser/extensions/extension_storage_monitor.cc
|
| index 1e3f09fa0bb35e7a976dc56a5c7bac163ba79a84..2e673988e9eea10caf0a30b547a668964f058806 100644
|
| --- a/chrome/browser/extensions/extension_storage_monitor.cc
|
| +++ b/chrome/browser/extensions/extension_storage_monitor.cc
|
| @@ -211,7 +211,7 @@ void ExtensionStorageMonitor::Observe(
|
| }
|
| default:
|
| NOTREACHED();
|
| - };
|
| + }
|
| }
|
|
|
| void ExtensionStorageMonitor::OnExtensionLoaded(
|
| @@ -324,7 +324,7 @@ void ExtensionStorageMonitor::OnNotificationButtonClick(
|
| }
|
| default:
|
| NOTREACHED();
|
| - };
|
| + }
|
| }
|
|
|
| void ExtensionStorageMonitor::DisableStorageMonitoring(
|
| @@ -348,13 +348,15 @@ void ExtensionStorageMonitor::StartMonitoringStorage(
|
| if (extension->location() == Manifest::COMPONENT)
|
| return;
|
|
|
| + ExtensionPrefs* prefs = ExtensionPrefs::Get(context_);
|
| + DCHECK(prefs);
|
| +
|
| // First apply this feature only to experimental ephemeral apps. If it works
|
| // well, roll it out to all extensions and apps.
|
| - if (!extension->is_ephemeral() && !enable_for_all_extensions_)
|
| + bool is_ephemeral = prefs->IsEphemeralApp(extension->id());
|
| + if (!is_ephemeral && !enable_for_all_extensions_)
|
| return;
|
|
|
| - ExtensionPrefs* prefs = ExtensionPrefs::Get(context_);
|
| - DCHECK(prefs);
|
| if (!prefs->IsStorageNotificationEnabled(extension->id()))
|
| return;
|
|
|
| @@ -380,8 +382,8 @@ void ExtensionStorageMonitor::StartMonitoringStorage(
|
| if (next_threshold == 0) {
|
| // The next threshold is written to the prefs after the initial threshold is
|
| // exceeded.
|
| - next_threshold = extension->is_ephemeral() ? initial_ephemeral_threshold_
|
| - : initial_extension_threshold_;
|
| + next_threshold = is_ephemeral ? initial_ephemeral_threshold_
|
| + : initial_extension_threshold_;
|
| }
|
|
|
| BrowserThread::PostTask(
|
|
|