Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: chrome/browser/history/history_database.cc

Issue 14976003: Histogram versions and extended error codes for SQLite databases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops - need old histograms for continuity. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/history/text_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/text_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698