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

Side by Side Diff: extensions/browser/extension_util.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 unified diff | Download patch
« no previous file with comments | « extensions/browser/extension_util.h ('k') | extensions/common/extension.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "extensions/browser/extension_util.h"
6
7 #include "extensions/browser/extension_prefs.h"
8 #include "extensions/browser/extension_registry.h"
9
10 namespace extensions {
11 namespace util {
12
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);
18 }
19
20 bool IsEphemeralApp(const std::string& extension_id,
21 content::BrowserContext* context) {
22 return ExtensionPrefs::Get(context)->IsEphemeralApp(extension_id);
23 }
24
25 } // namespace util
26 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_util.h ('k') | extensions/common/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698