| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // Returns a new API permission which equals this - |rhs|. | 316 // Returns a new API permission which equals this - |rhs|. |
| 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 // Gets the size of the data to be written. |
| 327 virtual void GetSize(base::PickleSizer* s) const = 0; |
| 328 |
| 326 // Writes this into the given IPC message |m|. | 329 // Writes this into the given IPC message |m|. |
| 327 virtual void Write(base::Pickle* m) const = 0; | 330 virtual void Write(base::Pickle* m) const = 0; |
| 328 | 331 |
| 329 // Reads from the given IPC message |m|. | 332 // Reads from the given IPC message |m|. |
| 330 virtual bool Read(const base::Pickle* m, base::PickleIterator* iter) = 0; | 333 virtual bool Read(const base::Pickle* m, base::PickleIterator* iter) = 0; |
| 331 | 334 |
| 332 // Logs this permission. | 335 // Logs this permission. |
| 333 virtual void Log(std::string* log) const = 0; | 336 virtual void Log(std::string* log) const = 0; |
| 334 | 337 |
| 335 private: | 338 private: |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 433 |
| 431 const APIPermission::ID id_; | 434 const APIPermission::ID id_; |
| 432 const char* const name_; | 435 const char* const name_; |
| 433 const int flags_; | 436 const int flags_; |
| 434 const APIPermissionConstructor api_permission_constructor_; | 437 const APIPermissionConstructor api_permission_constructor_; |
| 435 }; | 438 }; |
| 436 | 439 |
| 437 } // namespace extensions | 440 } // namespace extensions |
| 438 | 441 |
| 439 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ | 442 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ |
| OLD | NEW |