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

Unified Diff: sql/connection.h

Issue 2297243004: [WIP] histroy: Adjust cache size OnMemoryStateChange() (Closed)
Patch Set: Created 4 years, 3 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
Index: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index 5b8d39964ab2aa4e96312b790606c7b0bd0c8b29..9cab2b3dcd72b48647b486eedd4f7f175e1fb39b 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -288,6 +288,11 @@ class SQL_EXPORT Connection {
// usage by half.
void TrimMemory(bool aggressively);
+ // Update the cache size. Unlike set_cache_size(), this will have an effect
+ // even after initialization. Returns true if cache size is successfully
+ // updated. The total cache size in bytes will be page_size * new_cache_size.
+ bool UpdateCacheSize(int new_cache_size);
Scott Hess - ex-Googler 2016/09/01 18:29:09 I want to complain that this should be called Set
+
// Raze the database to the ground. This approximates creating a
// fresh database from scratch, within the constraints of SQLite's
// locking protocol (locks and open handles can make doing this with

Powered by Google App Engine
This is Rietveld 408576698