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

Unified Diff: extensions/browser/api/runtime/runtime_api.cc

Issue 282103003: Moved IS_EPHEMERAL flag to extension prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up file header Created 6 years, 7 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 | « chrome/test/data/extensions/app_list/Preferences ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/runtime/runtime_api.cc
diff --git a/extensions/browser/api/runtime/runtime_api.cc b/extensions/browser/api/runtime/runtime_api.cc
index 9dc3febdc000555f36c07aac866c04fad48fa944..4a1c24579111bb2efa00399d6507118246e8dd01 100644
--- a/extensions/browser/api/runtime/runtime_api.cc
+++ b/extensions/browser/api/runtime/runtime_api.cc
@@ -24,6 +24,7 @@
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_util.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/lazy_background_task_queue.h"
#include "extensions/browser/process_manager.h"
@@ -227,7 +228,7 @@ void RuntimeAPI::OnExtensionLoaded(const Extension* extension) {
void RuntimeAPI::OnExtensionInstalled(const Extension* extension) {
// Ephemeral apps are not considered to be installed and do not receive
// the onInstalled() event.
- if (extension->is_ephemeral())
+ if (util::IsEphemeralApp(extension->id(), browser_context_))
return;
Version old_version = delegate_->GetPreviousExtensionVersion(extension);
@@ -245,7 +246,7 @@ void RuntimeAPI::OnExtensionInstalled(const Extension* extension) {
void RuntimeAPI::OnExtensionUninstalled(const Extension* extension) {
// Ephemeral apps are not considered to be installed, so the uninstall URL
// is not invoked when they are removed.
- if (extension->is_ephemeral())
+ if (util::IsEphemeralApp(extension->id(), browser_context_))
return;
RuntimeEventRouter::OnExtensionUninstalled(browser_context_, extension->id());
« no previous file with comments | « chrome/test/data/extensions/app_list/Preferences ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698