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

Side by Side Diff: extensions/common/extension.h

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.cc ('k') | extensions/common/extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_
6 #define EXTENSIONS_COMMON_EXTENSION_H_ 6 #define EXTENSIONS_COMMON_EXTENSION_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // extension should be errors rather than warnings. 156 // extension should be errors rather than warnings.
157 ERROR_ON_PRIVATE_KEY = 1 << 6, 157 ERROR_ON_PRIVATE_KEY = 1 << 6,
158 158
159 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was 159 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was
160 // created. 160 // created.
161 WAS_INSTALLED_BY_DEFAULT = 1 << 7, 161 WAS_INSTALLED_BY_DEFAULT = 1 << 7,
162 162
163 // Unused - was part of an abandoned experiment. 163 // Unused - was part of an abandoned experiment.
164 REQUIRE_PERMISSIONS_CONSENT = 1 << 8, 164 REQUIRE_PERMISSIONS_CONSENT = 1 << 8,
165 165
166 // |IS_EPHEMERAL| identifies ephemeral apps (experimental), which are not 166 // Unused - this flag has been moved to ExtensionPrefs.
167 // permanently installed.
168 IS_EPHEMERAL = 1 << 9, 167 IS_EPHEMERAL = 1 << 9,
169 168
170 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should 169 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should
171 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are 170 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are
172 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true). 171 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true).
173 WAS_INSTALLED_BY_OEM = 1 << 10, 172 WAS_INSTALLED_BY_OEM = 1 << 10,
174 }; 173 };
175 174
176 static scoped_refptr<Extension> Create(const base::FilePath& path, 175 static scoped_refptr<Extension> Create(const base::FilePath& path,
177 Manifest::Location location, 176 Manifest::Location location,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 325 }
327 int creation_flags() const { return creation_flags_; } 326 int creation_flags() const { return creation_flags_; }
328 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } 327 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; }
329 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } 328 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; }
330 bool was_installed_by_default() const { 329 bool was_installed_by_default() const {
331 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; 330 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0;
332 } 331 }
333 bool was_installed_by_oem() const { 332 bool was_installed_by_oem() const {
334 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0; 333 return (creation_flags_ & WAS_INSTALLED_BY_OEM) != 0;
335 } 334 }
336 bool is_ephemeral() const { return (creation_flags_ & IS_EPHEMERAL) != 0; }
337 335
338 // App-related. 336 // App-related.
339 bool is_app() const; 337 bool is_app() const;
340 bool is_platform_app() const; 338 bool is_platform_app() const;
341 bool is_hosted_app() const; 339 bool is_hosted_app() const;
342 bool is_legacy_packaged_app() const; 340 bool is_legacy_packaged_app() const;
343 bool is_extension() const; 341 bool is_extension() const;
344 bool can_be_incognito_enabled() const; 342 bool can_be_incognito_enabled() const;
345 343
346 void AddWebExtentPattern(const URLPattern& pattern); 344 void AddWebExtentPattern(const URLPattern& pattern);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 547
550 UpdatedExtensionPermissionsInfo( 548 UpdatedExtensionPermissionsInfo(
551 const Extension* extension, 549 const Extension* extension,
552 const PermissionSet* permissions, 550 const PermissionSet* permissions,
553 Reason reason); 551 Reason reason);
554 }; 552 };
555 553
556 } // namespace extensions 554 } // namespace extensions
557 555
558 #endif // EXTENSIONS_COMMON_EXTENSION_H_ 556 #endif // EXTENSIONS_COMMON_EXTENSION_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_util.cc ('k') | extensions/common/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698