blob: 6bd3c86ea16c0bd69f8e97c351b2763f2c7755d6 [file] [log] [blame]
[email protected]411f8ae2014-05-22 11:12:231// 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.
4
5#ifndef EXTENSIONS_BROWSER_EXTENSION_UTIL_H_
6#define EXTENSIONS_BROWSER_EXTENSION_UTIL_H_
7
8#include <string>
9
tfarina01710e32015-07-13 21:53:2210class GURL;
11
[email protected]411f8ae2014-05-22 11:12:2312namespace content {
13class BrowserContext;
14}
15
16namespace extensions {
tfarina01710e32015-07-13 21:53:2217
18struct ExtensionInfo;
19
[email protected]411f8ae2014-05-22 11:12:2320namespace util {
21
tfarina01710e32015-07-13 21:53:2222// TODO(tmdiep): Move functions from
23// chrome/browser/extensions/extension_util.h/cc that are only dependent on
24// extensions/ here.
[email protected]411f8ae2014-05-22 11:12:2325
26// Returns true if |extension_id| identifies an extension that is installed
27// permanently and not ephemerally.
28bool IsExtensionInstalledPermanently(const std::string& extension_id,
29 content::BrowserContext* context);
30
31// Returns true if |extension_id| identifies an ephemeral app.
32bool IsEphemeralApp(const std::string& extension_id,
33 content::BrowserContext* context);
34
tfarina01710e32015-07-13 21:53:2235// Returns true if the extension has isolated storage.
36bool HasIsolatedStorage(const ExtensionInfo& info);
37
38// Returns true if the site URL corresponds to an extension or app and has
39// isolated storage.
40bool SiteHasIsolatedStorage(const GURL& extension_site_url,
41 content::BrowserContext* context);
42
[email protected]411f8ae2014-05-22 11:12:2343} // namespace util
44} // namespace extensions
45
46#endif // EXTENSIONS_BROWSER_EXTENSION_UTIL_H_