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

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

Issue 479513004: Prevent extension sideloading from Windows registry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should 160 // |WAS_INSTALLED_BY_OEM| installed by an OEM (e.g on Chrome OS) and should
161 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are 161 // be placed in a special OEM folder in the App Launcher. Note: OEM apps are
162 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true). 162 // also installed by Default (i.e. WAS_INSTALLED_BY_DEFAULT is also true).
163 WAS_INSTALLED_BY_OEM = 1 << 10, 163 WAS_INSTALLED_BY_OEM = 1 << 10,
164 164
165 // |WAS_INSTALLED_BY_CUSTODIAN| means this extension was installed by the 165 // |WAS_INSTALLED_BY_CUSTODIAN| means this extension was installed by the
166 // custodian of a supervised user. 166 // custodian of a supervised user.
167 WAS_INSTALLED_BY_CUSTODIAN = 1 << 11, 167 WAS_INSTALLED_BY_CUSTODIAN = 1 << 11,
168 168
169 // |MAY_BE_UNTRUSTED| indicates that this extension came from a potentially
170 // unsafe source (e.g., sideloaded from a local CRX file via the Windows
171 // registry). Such extensions may be subjected to additional constraints
172 // before they are fully installed and enabled.
173 MAY_BE_UNTRUSTED = 1 << 12,
174
169 // When adding new flags, make sure to update kInitFromValueFlagBits. 175 // When adding new flags, make sure to update kInitFromValueFlagBits.
170 }; 176 };
171 177
172 // This is the highest bit index of the flags defined above. 178 // This is the highest bit index of the flags defined above.
173 static const int kInitFromValueFlagBits; 179 static const int kInitFromValueFlagBits;
174 180
175 static scoped_refptr<Extension> Create(const base::FilePath& path, 181 static scoped_refptr<Extension> Create(const base::FilePath& path,
176 Manifest::Location location, 182 Manifest::Location location,
177 const base::DictionaryValue& value, 183 const base::DictionaryValue& value,
178 int flags, 184 int flags,
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 567
562 UpdatedExtensionPermissionsInfo( 568 UpdatedExtensionPermissionsInfo(
563 const Extension* extension, 569 const Extension* extension,
564 const PermissionSet* permissions, 570 const PermissionSet* permissions,
565 Reason reason); 571 Reason reason);
566 }; 572 };
567 573
568 } // namespace extensions 574 } // namespace extensions
569 575
570 #endif // EXTENSIONS_COMMON_EXTENSION_H_ 576 #endif // EXTENSIONS_COMMON_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698