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 "components/history/core/browser/thumbnail_database.h" | 5 #include "components/history/core/browser/thumbnail_database.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/debug/alias.h" | 11 #include "base/debug/alias.h" |
12 #include "base/debug/dump_without_crashing.h" | 12 #include "base/debug/dump_without_crashing.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/format_macros.h" | 14 #include "base/format_macros.h" |
15 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram_macros.h" |
17 #include "base/rand_util.h" | 17 #include "base/rand_util.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "components/history/core/browser/history_client.h" | 21 #include "components/history/core/browser/history_client.h" |
22 #include "components/history/core/browser/url_database.h" | 22 #include "components/history/core/browser/url_database.h" |
23 #include "sql/recovery.h" | 23 #include "sql/recovery.h" |
24 #include "sql/statement.h" | 24 #include "sql/statement.h" |
25 #include "sql/transaction.h" | 25 #include "sql/transaction.h" |
26 #include "third_party/sqlite/sqlite3.h" | 26 #include "third_party/sqlite/sqlite3.h" |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 meta_table_.SetVersionNumber(8); | 1378 meta_table_.SetVersionNumber(8); |
1379 meta_table_.SetCompatibleVersionNumber(std::min(8, kCompatibleVersionNumber)); | 1379 meta_table_.SetCompatibleVersionNumber(std::min(8, kCompatibleVersionNumber)); |
1380 return true; | 1380 return true; |
1381 } | 1381 } |
1382 | 1382 |
1383 bool ThumbnailDatabase::IsFaviconDBStructureIncorrect() { | 1383 bool ThumbnailDatabase::IsFaviconDBStructureIncorrect() { |
1384 return !db_.IsSQLValid("SELECT id, url, icon_type FROM favicons"); | 1384 return !db_.IsSQLValid("SELECT id, url, icon_type FROM favicons"); |
1385 } | 1385 } |
1386 | 1386 |
1387 } // namespace history | 1387 } // namespace history |
OLD | NEW |