blob: 4d6b24a5bbcaca5d6bb16be0c14103cb89362484 [file] [log] [blame]
Victor Costan7f6abbbe2018-07-29 02:57:271// 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
8namespace sql {
9
Victor Costan455989b2019-05-13 21:43:1510namespace test {
11struct ColumnInfo;
12} // namespace test
13
Victor Costan7f6abbbe2018-07-29 02:57:2714// Restricts access to APIs internal to the //sql package.
15//
16// This implements Java's package-private via the passkey idiom.
17class InternalApiToken {
18 private:
19 // Must NOT be =default to disallow creation by uniform initialization.
20 InternalApiToken() {}
21 InternalApiToken(const InternalApiToken&) = default;
22
Victor Costancfbfa602018-08-01 23:24:4623 friend class DatabaseTestPeer;
Victor Costan7f6abbbe2018-07-29 02:57:2724 friend class Recovery;
Victor Costan455989b2019-05-13 21:43:1525 friend struct test::ColumnInfo;
Victor Costan7f6abbbe2018-07-29 02:57:2726};
27
28} // namespace sql
29
30#endif // SQL_INTERNAL_API_TOKEN_H_