| Index: extensions/browser/extension_prefs.cc
|
| diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc
|
| index 3bbe6b2492bbde73b34ac4d0faaa4fcc8d5b0439..4d5b6c03ba0963634dcf428562cf10606f2f59a4 100644
|
| --- a/extensions/browser/extension_prefs.cc
|
| +++ b/extensions/browser/extension_prefs.cc
|
| @@ -1640,6 +1640,10 @@ void ExtensionPrefs::RemoveEvictedEphemeralApp(
|
| }
|
|
|
| bool ExtensionPrefs::IsEphemeralApp(const std::string& extension_id) const {
|
| + // Hide the data of evicted ephemeral apps.
|
| + if (ReadPrefAsBooleanAndReturn(extension_id, kPrefEvictedEphemeralApp))
|
| + return false;
|
| +
|
| if (ReadPrefAsBooleanAndReturn(extension_id, kPrefEphemeralApp))
|
| return true;
|
|
|
| @@ -1648,6 +1652,16 @@ bool ExtensionPrefs::IsEphemeralApp(const std::string& extension_id) const {
|
| return (GetCreationFlags(extension_id) & Extension::IS_EPHEMERAL) != 0;
|
| }
|
|
|
| +void ExtensionPrefs::OnEphemeralAppInstalled(const std::string& extension_id) {
|
| + DCHECK(IsEphemeralApp(extension_id));
|
| +
|
| + ScopedExtensionPrefUpdate update(prefs_, extension_id);
|
| + update->Set(kPrefEphemeralApp, new base::FundamentalValue(false));
|
| +
|
| + DCHECK(!IsEvictedEphemeralApp(update.Get()));
|
| + update->Remove(kPrefEvictedEphemeralApp, NULL);
|
| +}
|
| +
|
| bool ExtensionPrefs::WasAppDraggedByUser(const std::string& extension_id) {
|
| return ReadPrefAsBooleanAndReturn(extension_id, kPrefUserDraggedApp);
|
| }
|
| @@ -2142,10 +2156,8 @@ void ExtensionPrefs::PopulateExtensionInfoPrefs(
|
| if (blacklisted_for_malware)
|
| extension_dict->Set(kPrefBlacklist, new base::FundamentalValue(true));
|
|
|
| - if (is_ephemeral)
|
| - extension_dict->Set(kPrefEphemeralApp, new base::FundamentalValue(true));
|
| - else
|
| - extension_dict->Remove(kPrefEphemeralApp, NULL);
|
| + extension_dict->Set(kPrefEphemeralApp,
|
| + new base::FundamentalValue(is_ephemeral));
|
|
|
| base::FilePath::StringType path = MakePathRelative(install_directory_,
|
| extension->path());
|
|
|