| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webdata/keyword_table.h" | 5 #include "chrome/browser/webdata/keyword_table.h" |
| 6 | 6 |
| 7 #include "app/sql/statement.h" | |
| 8 #include "base/logging.h" | 7 #include "base/logging.h" |
| 9 #include "base/string_split.h" | 8 #include "base/string_split.h" |
| 10 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 11 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/history/history_database.h" | 11 #include "chrome/browser/history/history_database.h" |
| 13 #include "chrome/browser/search_engines/template_url.h" | 12 #include "chrome/browser/search_engines/template_url.h" |
| 14 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "sql/statement.h" |
| 15 | 15 |
| 16 using base::Time; | 16 using base::Time; |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // ID of the url column in keywords. | 20 // ID of the url column in keywords. |
| 21 const int kUrlIdPosition = 17; | 21 const int kUrlIdPosition = 17; |
| 22 | 22 |
| 23 // Keys used in the meta table. | 23 // Keys used in the meta table. |
| 24 const char* kDefaultSearchProviderKey = "Default Search Provider ID"; | 24 const char* kDefaultSearchProviderKey = "Default Search Provider ID"; |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (!db_->Execute("ALTER TABLE keywords_temp RENAME TO keywords")) | 294 if (!db_->Execute("ALTER TABLE keywords_temp RENAME TO keywords")) |
| 295 return false; | 295 return false; |
| 296 | 296 |
| 297 return true; | 297 return true; |
| 298 } | 298 } |
| 299 | 299 |
| 300 bool KeywordTable::MigrateToVersion38AddLastModifiedColumn() { | 300 bool KeywordTable::MigrateToVersion38AddLastModifiedColumn() { |
| 301 return db_->Execute( | 301 return db_->Execute( |
| 302 "ALTER TABLE keywords ADD COLUMN last_modified INTEGER DEFAULT 0"); | 302 "ALTER TABLE keywords ADD COLUMN last_modified INTEGER DEFAULT 0"); |
| 303 } | 303 } |
| OLD | NEW |