summaryrefslogtreecommitdiff
path: root/chromium/sql/internal_api_token.h
blob: b237b3a3b3367ebb89b3cd13d73c51ead19a9875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SQL_INTERNAL_API_TOKEN_H_
#define SQL_INTERNAL_API_TOKEN_H_

namespace sql {

namespace test {
struct ColumnInfo;
bool CorruptSizeInHeader(const base::FilePath&);
}  // namespace test

// Restricts access to APIs internal to the //sql package.
//
// This implements Java's package-private via the passkey idiom.
class InternalApiToken {
 private:
  // Must NOT be =default to disallow creation by uniform initialization.
  InternalApiToken() {}
  InternalApiToken(const InternalApiToken&) = default;

  friend class DatabaseTestPeer;
  friend class Recovery;
  friend struct test::ColumnInfo;
  friend bool test::CorruptSizeInHeader(const base::FilePath&);
};

}  // namespace sql

#endif  // SQL_INTERNAL_API_TOKEN_H_