OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_PERMISSIONS_MANIFEST_PERMISSION_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ |
6 #define EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual ManifestPermission* Intersect(const ManifestPermission* rhs) | 61 virtual ManifestPermission* Intersect(const ManifestPermission* rhs) |
62 const = 0; | 62 const = 0; |
63 | 63 |
64 // Returns true if |rhs| is a subset of this. | 64 // Returns true if |rhs| is a subset of this. |
65 bool Contains(const ManifestPermission* rhs) const; | 65 bool Contains(const ManifestPermission* rhs) const; |
66 | 66 |
67 // Returns true if |rhs| is equal to this. | 67 // Returns true if |rhs| is equal to this. |
68 bool Equal(const ManifestPermission* rhs) const; | 68 bool Equal(const ManifestPermission* rhs) const; |
69 | 69 |
70 // IPC functions | 70 // IPC functions |
| 71 // Gets the size of the data to be written. |
| 72 void GetSize(base::PickleSizer* s) const; |
| 73 |
71 // Writes this into the given IPC message |m|. | 74 // Writes this into the given IPC message |m|. |
72 void Write(base::Pickle* m) const; | 75 void Write(base::Pickle* m) const; |
73 | 76 |
74 // Reads from the given IPC message |m|. | 77 // Reads from the given IPC message |m|. |
75 bool Read(const base::Pickle* m, base::PickleIterator* iter); | 78 bool Read(const base::Pickle* m, base::PickleIterator* iter); |
76 | 79 |
77 // Logs this permission. | 80 // Logs this permission. |
78 void Log(std::string* log) const; | 81 void Log(std::string* log) const; |
79 | 82 |
80 private: | 83 private: |
81 DISALLOW_COPY_AND_ASSIGN(ManifestPermission); | 84 DISALLOW_COPY_AND_ASSIGN(ManifestPermission); |
82 }; | 85 }; |
83 | 86 |
84 } // namespace extensions | 87 } // namespace extensions |
85 | 88 |
86 #endif // EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ | 89 #endif // EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ |
OLD | NEW |