// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_DATABASE_STRING_TABLE_H_ #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_DATABASE_STRING_TABLE_H_ #include <stdint.h> #include <map> #include <string> #include "base/gtest_prod_util.h" namespace sql { class Database; } // namespace sql namespace extensions { // A class for maintaining a persistent mapping between strings and integers. // This is used to help compress the contents of the activity log database on // disk by replacing repeated strings by smaller integers. // // The mapping from integers to strings is maintained in a database table, but // the mapping is also cached in memory. // // The database table used to store the strings is configurable, but its layout // is fixed: it always consists of just two columns, "id" and "value". // // All calls to DatabaseStringTable must occur on the database thread. class DatabaseStringTable { … }; } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_DATABASE_STRING_TABLE_H_