| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
| 7 #include "base/string_split.h" | 7 #include "base/string_split.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" | 9 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
| 10 #include "chrome/browser/history/history_types.h" | 10 #include "chrome/browser/history/history_types.h" |
| 11 #include "chrome/browser/history/top_sites.h" | 11 #include "chrome/browser/history/top_sites.h" |
| 12 #include "chrome/browser/history/top_sites_database.h" | 12 #include "chrome/browser/history/top_sites_database.h" |
| 13 #include "sql/connection.h" | 13 #include "sql/connection.h" |
| 14 #include "sql/statement.h" |
| 14 #include "sql/transaction.h" | 15 #include "sql/transaction.h" |
| 15 | 16 |
| 16 namespace history { | 17 namespace history { |
| 17 | 18 |
| 18 // From the version 1 to 2, one column was added. Old versions of Chrome | 19 // From the version 1 to 2, one column was added. Old versions of Chrome |
| 19 // should be able to read version 2 files just fine. | 20 // should be able to read version 2 files just fine. |
| 20 static const int kVersionNumber = 2; | 21 static const int kVersionNumber = 2; |
| 21 | 22 |
| 22 TopSitesDatabase::TopSitesDatabase() : may_need_history_migration_(false) { | 23 TopSitesDatabase::TopSitesDatabase() : may_need_history_migration_(false) { |
| 23 } | 24 } |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 381 |
| 381 if (!db->Open(db_name)) { | 382 if (!db->Open(db_name)) { |
| 382 LOG(ERROR) << db->GetErrorMessage(); | 383 LOG(ERROR) << db->GetErrorMessage(); |
| 383 return NULL; | 384 return NULL; |
| 384 } | 385 } |
| 385 | 386 |
| 386 return db.release(); | 387 return db.release(); |
| 387 } | 388 } |
| 388 | 389 |
| 389 } // namespace history | 390 } // namespace history |
| OLD | NEW |