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_API_PERMISSION_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ |
6 #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 virtual APIPermission* Diff(const APIPermission* rhs) const = 0; | 317 virtual APIPermission* Diff(const APIPermission* rhs) const = 0; |
318 | 318 |
319 // Returns a new API permission which equals the union of this and |rhs|. | 319 // Returns a new API permission which equals the union of this and |rhs|. |
320 virtual APIPermission* Union(const APIPermission* rhs) const = 0; | 320 virtual APIPermission* Union(const APIPermission* rhs) const = 0; |
321 | 321 |
322 // Returns a new API permission which equals the intersect of this and |rhs|. | 322 // Returns a new API permission which equals the intersect of this and |rhs|. |
323 virtual APIPermission* Intersect(const APIPermission* rhs) const = 0; | 323 virtual APIPermission* Intersect(const APIPermission* rhs) const = 0; |
324 | 324 |
325 // IPC functions | 325 // IPC functions |
326 // Writes this into the given IPC message |m|. | 326 // Writes this into the given IPC message |m|. |
327 virtual void Write(IPC::Message* m) const = 0; | 327 virtual void Write(base::Pickle* m) const = 0; |
328 | 328 |
329 // Reads from the given IPC message |m|. | 329 // Reads from the given IPC message |m|. |
330 virtual bool Read(const IPC::Message* m, base::PickleIterator* iter) = 0; | 330 virtual bool Read(const base::Pickle* m, base::PickleIterator* iter) = 0; |
331 | 331 |
332 // Logs this permission. | 332 // Logs this permission. |
333 virtual void Log(std::string* log) const = 0; | 333 virtual void Log(std::string* log) const = 0; |
334 | 334 |
335 private: | 335 private: |
336 const APIPermissionInfo* const info_; | 336 const APIPermissionInfo* const info_; |
337 }; | 337 }; |
338 | 338 |
339 | 339 |
340 // The APIPermissionInfo is an immutable class that describes a single | 340 // The APIPermissionInfo is an immutable class that describes a single |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 430 |
431 const APIPermission::ID id_; | 431 const APIPermission::ID id_; |
432 const char* const name_; | 432 const char* const name_; |
433 const int flags_; | 433 const int flags_; |
434 const APIPermissionConstructor api_permission_constructor_; | 434 const APIPermissionConstructor api_permission_constructor_; |
435 }; | 435 }; |
436 | 436 |
437 } // namespace extensions | 437 } // namespace extensions |
438 | 438 |
439 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ | 439 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ |
OLD | NEW |