| Index: extensions/browser/extension_util.cc
|
| diff --git a/extensions/browser/extension_util.cc b/extensions/browser/extension_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..52e7f5f1f8a0f42a9e46dbfc4be335bf1715a29d
|
| --- /dev/null
|
| +++ b/extensions/browser/extension_util.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "extensions/browser/extension_util.h"
|
| +
|
| +#include "extensions/browser/extension_prefs.h"
|
| +#include "extensions/browser/extension_registry.h"
|
| +
|
| +namespace extensions {
|
| +namespace util {
|
| +
|
| +bool IsExtensionInstalledPermanently(const std::string& extension_id,
|
| + content::BrowserContext* context) {
|
| + const Extension* extension = ExtensionRegistry::Get(context)->
|
| + GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING);
|
| + return extension && !IsEphemeralApp(extension_id, context);
|
| +}
|
| +
|
| +bool IsEphemeralApp(const std::string& extension_id,
|
| + content::BrowserContext* context) {
|
| + return ExtensionPrefs::Get(context)->IsEphemeralApp(extension_id);
|
| +}
|
| +
|
| +} // namespace util
|
| +} // namespace extensions
|
|
|