summaryrefslogtreecommitdiffstats
path: root/chrome/browser/meta_table_helper.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 00:14:44 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 00:14:44 +0000
commitc91a523e35cbbf233f82ae17a340b92459da5103 (patch)
treeb2250e24027c075b4939f0735e11d435a528ca93 /chrome/browser/meta_table_helper.h
parent6e9c8ffa0f3e084c2cdeac1bd4e0f506e04b5036 (diff)
downloadchromium_src-c91a523e35cbbf233f82ae17a340b92459da5103.zip
chromium_src-c91a523e35cbbf233f82ae17a340b92459da5103.tar.gz
chromium_src-c91a523e35cbbf233f82ae17a340b92459da5103.tar.bz2
Add compatible version support since it was only halfway in place, and try and make our database versioning code and logging more similar across various consumers.
The compatible version support isn't really used yet. It was going to be used for my cookie change until we decided that the old code was too busted to be forward-compatible. It seems worthwhile to put this in but maybe I am wrong. The logging similarity stuff is fairly useful. In a couple consumers in the old code, we DLOGed instead of LOGing, which meant that most people would get nothing in the log at all. I think it's a little weird that in a lot of these consumers, logging is all we do; for example, if you use a too-new cookie DB, you get output in the log, but no actual dialog box while the browser is running -- your cookies just silently don't get saved to disk. Seems bad, but I'm not prepared to try and do major surgery to address that (and add translated strings, etc.). At least now we'll actually get log messages in release builds instead of nothing at all. Because my last-access change touches this code, I'm considering asking that this change be merged back to the branch. Review URL: http://codereview.chromium.org/8712 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/meta_table_helper.h')
-rw-r--r--chrome/browser/meta_table_helper.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/meta_table_helper.h b/chrome/browser/meta_table_helper.h
index 8b072b8..05c1bc2 100644
--- a/chrome/browser/meta_table_helper.h
+++ b/chrome/browser/meta_table_helper.h
@@ -26,13 +26,16 @@ class MetaTableHelper {
~MetaTableHelper();
// Initializes the MetaTableHelper, creating the meta table if necessary. For
- // new tables, it will initialize the version number to |version| and will
- // set the optional |is_new| out var to true.
+ // new tables, it will initialize the version number to |version| and the
+ // compatible version number to |compatible_version|.
//
// The name of the database in the sqlite connection (for tables named with
// the "db_name.table_name" scheme is given in |db_name|. If empty, it is
// assumed there is no database name.
- bool Init(const std::string& db_name, int version, sqlite3* db);
+ bool Init(const std::string& db_name,
+ int version,
+ int compatible_version,
+ sqlite3* db);
// Version number. This should be the version number of the creator of the
// file. GetVersionNumber will return 0 if there is no version number.