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 "chrome/browser/history/history_database.h" | 5 #include "chrome/browser/history/history_database.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 HistoryDatabase::HistoryDatabase() | 40 HistoryDatabase::HistoryDatabase() |
41 : needs_version_17_migration_(false) { | 41 : needs_version_17_migration_(false) { |
42 } | 42 } |
43 | 43 |
44 HistoryDatabase::~HistoryDatabase() { | 44 HistoryDatabase::~HistoryDatabase() { |
45 } | 45 } |
46 | 46 |
47 sql::InitStatus HistoryDatabase::Init(const base::FilePath& history_name, | 47 sql::InitStatus HistoryDatabase::Init(const base::FilePath& history_name, |
48 sql::ErrorDelegate* error_delegate) { | 48 sql::ErrorDelegate* error_delegate) { |
49 db_.set_error_histogram_name("Sqlite.History.Error"); | 49 db_.set_histogram_tag("History"); |
50 | 50 |
51 // Set the exceptional sqlite error handler. | 51 // Set the exceptional sqlite error handler. |
52 db_.set_error_delegate(error_delegate); | 52 db_.set_error_delegate(error_delegate); |
53 | 53 |
54 // Set the database page size to something a little larger to give us | 54 // Set the database page size to something a little larger to give us |
55 // better performance (we're typically seek rather than bandwidth limited). | 55 // better performance (we're typically seek rather than bandwidth limited). |
56 // This only has an effect before any tables have been created, otherwise | 56 // This only has an effect before any tables have been created, otherwise |
57 // this is a NOP. Must be a power of 2 and a max of 8192. | 57 // this is a NOP. Must be a power of 2 and a max of 8192. |
58 db_.set_page_size(4096); | 58 db_.set_page_size(4096); |
59 | 59 |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 "WHERE id IN (SELECT id FROM segment_usage WHERE time_slot > 0);")); | 446 "WHERE id IN (SELECT id FROM segment_usage WHERE time_slot > 0);")); |
447 | 447 |
448 // Erase all the full text index files. These will take a while to update and | 448 // Erase all the full text index files. These will take a while to update and |
449 // are less important, so we just blow them away. Same with the archived | 449 // are less important, so we just blow them away. Same with the archived |
450 // database. | 450 // database. |
451 needs_version_17_migration_ = true; | 451 needs_version_17_migration_ = true; |
452 } | 452 } |
453 #endif | 453 #endif |
454 | 454 |
455 } // namespace history | 455 } // namespace history |
OLD | NEW |