Victor Costan | 7f6abbbe | 2018-07-29 02:57:27 | [diff] [blame] | 1 | // Copyright 2018 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 SQL_INTERNAL_API_TOKEN_H_ |
| 6 | #define SQL_INTERNAL_API_TOKEN_H_ |
| 7 | |
| 8 | namespace sql { |
| 9 | |
| 10 | // Restricts access to APIs internal to the //sql package. |
| 11 | // |
| 12 | // This implements Java's package-private via the passkey idiom. |
| 13 | class InternalApiToken { |
| 14 | private: |
| 15 | // Must NOT be =default to disallow creation by uniform initialization. |
| 16 | InternalApiToken() {} |
| 17 | InternalApiToken(const InternalApiToken&) = default; |
| 18 | |
Victor Costan | cfbfa60 | 2018-08-01 23:24:46 | [diff] [blame] | 19 | friend class DatabaseTestPeer; |
Victor Costan | 7f6abbbe | 2018-07-29 02:57:27 | [diff] [blame] | 20 | friend class Recovery; |
| 21 | }; |
| 22 | |
| 23 | } // namespace sql |
| 24 | |
| 25 | #endif // SQL_INTERNAL_API_TOKEN_H_ |