Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8788)

Unified Diff: chrome/browser/meta_table_helper.h

Issue 150094: Refactor MetaTableHelper to remove redundant table name prefixing with databa... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/meta_table_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/meta_table_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698