Chromecast on Android buildfix: don't try to create a RendererFactory.
[chromium-blink-merge.git] / extensions / browser / extension_util.cc
blob52e7f5f1f8a0f42a9e46dbfc4be335bf1715a29d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/browser/extension_util.h"
7 #include "extensions/browser/extension_prefs.h"
8 #include "extensions/browser/extension_registry.h"
10 namespace extensions {
11 namespace util {
13 bool IsExtensionInstalledPermanently(const std::string& extension_id,
14 content::BrowserContext* context) {
15 const Extension* extension = ExtensionRegistry::Get(context)->
16 GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING);
17 return extension && !IsEphemeralApp(extension_id, context);
20 bool IsEphemeralApp(const std::string& extension_id,
21 content::BrowserContext* context) {
22 return ExtensionPrefs::Get(context)->IsEphemeralApp(extension_id);
25 } // namespace util
26 } // namespace extensions