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

Side by Side Diff: chrome/common/extensions/chrome_manifest_permission_set.h

Issue 51433002: Enable permission warnings from ManifestHandlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing. Created 7 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_EXTENSIONS_CHROME_MANIFEST_PERMISSION_SET_H_
6 #define CHROME_COMMON_EXTENSIONS_CHROME_MANIFEST_PERMISSION_SET_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/strings/string16.h"
12
13 namespace base {
14 class ListValue;
15 }
16
17 namespace extensions {
18 class ManifestPermissionSet;
19 }
20
21 namespace extensions {
22
23 class ChromeManifestPermissionSet {
24 public:
25 // Parses permissions from |permissions| and adds the parsed permissions to
26 // |manifest_permissions|. If |unhandled_permissions| is not NULL, the names
27 // of all permissions that couldn't be parsed will be added to this vector.
28 // If |error| is NULL, parsing will continue with the next permission if
29 // invalid data is detected. If |error| is not NULL, it will be set to an
30 // error message and false is returned when an invalid permission is found.
31 static bool ParseFromJSON(
32 const base::ListValue* permissions,
33 ManifestPermissionSet* manifest_permissions,
34 string16* error,
35 std::vector<std::string>* unhandled_permissions);
36 };
37
38 } // namespace extensions
39
40 #endif // CHROME_COMMON_EXTENSIONS_CHROME_MANIFEST_PERMISSION_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698