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

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

Issue 240613004: Add UMA logging of extension creation flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add kInitFromValueFlagBits 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 | Annotate | Revision Log
« no previous file with comments | « extensions/common/extension.h ('k') | tools/metrics/histograms/histograms.xml » ('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 #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 = 11;
71
70 const char Extension::kMimeType[] = "application/x-chrome-extension"; 72 const char Extension::kMimeType[] = "application/x-chrome-extension";
71 73
72 const int Extension::kValidWebExtentSchemes = 74 const int Extension::kValidWebExtentSchemes =
73 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS; 75 URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS;
74 76
75 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | 77 const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI |
76 URLPattern::SCHEME_HTTP | 78 URLPattern::SCHEME_HTTP |
77 URLPattern::SCHEME_HTTPS | 79 URLPattern::SCHEME_HTTPS |
78 URLPattern::SCHEME_FILE | 80 URLPattern::SCHEME_FILE |
79 URLPattern::SCHEME_FTP; 81 URLPattern::SCHEME_FTP;
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 783
782 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 784 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
783 const Extension* extension, 785 const Extension* extension,
784 const PermissionSet* permissions, 786 const PermissionSet* permissions,
785 Reason reason) 787 Reason reason)
786 : reason(reason), 788 : reason(reason),
787 extension(extension), 789 extension(extension),
788 permissions(permissions) {} 790 permissions(permissions) {}
789 791
790 } // namespace extensions 792 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698