| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/meta_table_helper.h" | 5 #include "chrome/browser/meta_table_helper.h" |
| 6 | 6 |
| 7 #include <windows.h> | |
| 8 | |
| 9 #include "base/logging.h" | 7 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 11 #include "chrome/common/sqlite_utils.h" | 9 #include "chrome/common/sqlite_utils.h" |
| 12 | 10 |
| 13 // Key used in our meta table for version numbers. | 11 // Key used in our meta table for version numbers. |
| 14 static const char kVersionKey[] = "version"; | 12 static const char kVersionKey[] = "version"; |
| 15 static const char kCompatibleVersionKey[] = "last_compatible_version"; | 13 static const char kCompatibleVersionKey[] = "last_compatible_version"; |
| 16 | 14 |
| 17 MetaTableHelper::MetaTableHelper() : db_(NULL) { | 15 MetaTableHelper::MetaTableHelper() : db_(NULL) { |
| 18 } | 16 } |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 sql.append("meta WHERE key = ?"); | 157 sql.append("meta WHERE key = ?"); |
| 160 if (statement->prepare(db_, sql.c_str()) != SQLITE_OK) { | 158 if (statement->prepare(db_, sql.c_str()) != SQLITE_OK) { |
| 161 NOTREACHED() << sqlite3_errmsg(db_); | 159 NOTREACHED() << sqlite3_errmsg(db_); |
| 162 return false; | 160 return false; |
| 163 } | 161 } |
| 164 statement->bind_string(0, key); | 162 statement->bind_string(0, key); |
| 165 if (statement->step() != SQLITE_ROW) | 163 if (statement->step() != SQLITE_ROW) |
| 166 return false; | 164 return false; |
| 167 return true; | 165 return true; |
| 168 } | 166 } |
| OLD | NEW |