OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/manifest_handlers/permissions_parser.h" | 5 #include "extensions/common/manifest_handlers/permissions_parser.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace extensions { | 27 namespace extensions { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 namespace keys = manifest_keys; | 31 namespace keys = manifest_keys; |
32 namespace errors = manifest_errors; | 32 namespace errors = manifest_errors; |
33 | 33 |
34 struct ManifestPermissions : public Extension::ManifestData { | 34 struct ManifestPermissions : public Extension::ManifestData { |
35 ManifestPermissions(scoped_refptr<const PermissionSet> permissions); | 35 ManifestPermissions(scoped_refptr<const PermissionSet> permissions); |
36 virtual ~ManifestPermissions(); | 36 ~ManifestPermissions() override; |
37 | 37 |
38 scoped_refptr<const PermissionSet> permissions; | 38 scoped_refptr<const PermissionSet> permissions; |
39 }; | 39 }; |
40 | 40 |
41 ManifestPermissions::ManifestPermissions( | 41 ManifestPermissions::ManifestPermissions( |
42 scoped_refptr<const PermissionSet> permissions) | 42 scoped_refptr<const PermissionSet> permissions) |
43 : permissions(permissions) { | 43 : permissions(permissions) { |
44 } | 44 } |
45 | 45 |
46 ManifestPermissions::~ManifestPermissions() { | 46 ManifestPermissions::~ManifestPermissions() { |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // static | 348 // static |
349 scoped_refptr<const PermissionSet> PermissionsParser::GetOptionalPermissions( | 349 scoped_refptr<const PermissionSet> PermissionsParser::GetOptionalPermissions( |
350 const Extension* extension) { | 350 const Extension* extension) { |
351 DCHECK(extension->GetManifestData(keys::kOptionalPermissions)); | 351 DCHECK(extension->GetManifestData(keys::kOptionalPermissions)); |
352 return static_cast<const ManifestPermissions*>( | 352 return static_cast<const ManifestPermissions*>( |
353 extension->GetManifestData(keys::kOptionalPermissions)) | 353 extension->GetManifestData(keys::kOptionalPermissions)) |
354 ->permissions; | 354 ->permissions; |
355 } | 355 } |
356 | 356 |
357 } // namespace extensions | 357 } // namespace extensions |
OLD | NEW |