Index: chrome/browser/meta_table_helper.h |
=================================================================== |
--- chrome/browser/meta_table_helper.h (revision 19705) |
+++ chrome/browser/meta_table_helper.h (working copy) |
@@ -20,6 +20,12 @@ |
// database to use. |
class MetaTableHelper { |
public: |
+ // Primes the sqlite cache by filling it with the file in sequence |
+ // until there is no more data or the cache is full. Since this is one |
+ // contiguous read operation, it is much faster than letting the pages come |
+ // in on-demand (which causes lots of seeks). |
+ static void PrimeCache(const std::string& db_name, sqlite3* db); |
+ |
// Creates a new MetaTableHelper. After construction you must invoke |
// Init with the appropriate database. |
MetaTableHelper(); |
@@ -69,6 +75,11 @@ |
bool GetValue(const std::string& key, int64* value); |
private: |
+ friend class MetaTableHelperTest; |
M-A Ruel
2009/07/01 10:59:34
you could also use FRIEND_TEST() in gtest_prod.h.
|
+ |
+ // Appends the meta table name to the SQL statement. |
+ static void appendMetaTableName(const std::string& db_name, std::string* sql); |
+ |
// Conveniences to prepare the two types of statements used by |
// MetaTableHelper. |
bool PrepareSetStatement(SQLStatement* statement, const std::string& key); |