blob: b237b3a3b3367ebb89b3cd13d73c51ead19a9875 [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;
Shubham Aggarwal003708982020-10-28 17:57:5412bool CorruptSizeInHeader(const base::FilePath&);
Victor Costan455989b2019-05-13 21:43:1513} // namespace test
14
Victor Costan7f6abbbe2018-07-29 02:57:2715// Restricts access to APIs internal to the //sql package.
16//
17// This implements Java's package-private via the passkey idiom.
18class InternalApiToken {
19 private:
20 // Must NOT be =default to disallow creation by uniform initialization.
21 InternalApiToken() {}
22 InternalApiToken(const InternalApiToken&) = default;
23
Victor Costancfbfa602018-08-01 23:24:4624 friend class DatabaseTestPeer;
Victor Costan7f6abbbe2018-07-29 02:57:2725 friend class Recovery;
Victor Costan455989b2019-05-13 21:43:1526 friend struct test::ColumnInfo;
Shubham Aggarwal003708982020-10-28 17:57:5427 friend bool test::CorruptSizeInHeader(const base::FilePath&);
Victor Costan7f6abbbe2018-07-29 02:57:2728};
29
30} // namespace sql
31
32#endif // SQL_INTERNAL_API_TOKEN_H_