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

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

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 #include "extensions/common/extension.h" 5 #include "extensions/common/extension.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Extensions are cross-platform. 60 // Extensions are cross-platform.
61 // Since FilePath uses backslash '\\' as file path separator on Windows, so we 61 // Since FilePath uses backslash '\\' as file path separator on Windows, so we
62 // need to check manually. 62 // need to check manually.
63 if (path.value().find('\\') != path.value().npos) 63 if (path.value().find('\\') != path.value().npos)
64 return true; 64 return true;
65 return !net::IsSafePortableRelativePath(path); 65 return !net::IsSafePortableRelativePath(path);
66 } 66 }
67 67
68 } // namespace 68 } // namespace
69 69
70 const int Extension::kInitFromValueFlagBits = 12; 70 const int Extension::kInitFromValueFlagBits = 13;
71 71
72 const char Extension::kMimeType[] = "application/x-chrome-extension"; 72 const char Extension::kMimeType[] = "application/x-chrome-extension";
73 73
74 const int Extension::kValidWebExtentSchemes = 74 const int Extension::kValidWebExtentSchemes =
75 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; 75 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS;
76 76
77 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | 77 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI |
78 URLPattern::SCHEME_HTTP | 78 URLPattern::SCHEME_HTTP |
79 URLPattern::SCHEME_HTTPS | 79 URLPattern::SCHEME_HTTPS |
80 URLPattern::SCHEME_FILE | 80 URLPattern::SCHEME_FILE |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 779
780 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 780 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
781 const Extension* extension, 781 const Extension* extension,
782 const PermissionSet* permissions, 782 const PermissionSet* permissions,
783 Reason reason) 783 Reason reason)
784 : reason(reason), 784 : reason(reason),
785 extension(extension), 785 extension(extension),
786 permissions(permissions) {} 786 permissions(permissions) {}
787 787
788 } // namespace extensions 788 } // namespace extensions
OLDNEW
« chrome/app/generated_resources.grd ('K') | « extensions/common/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698