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

Side by Side Diff: chrome/browser/history/top_sites_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
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 "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_util.h" 7 #include "base/string_util.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.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"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 if (!delete_statement.Run()) 368 if (!delete_statement.Run())
369 return false; 369 return false;
370 370
371 return transaction.Commit(); 371 return transaction.Commit();
372 } 372 }
373 373
374 sql::Connection* TopSitesDatabase::CreateDB(const base::FilePath& db_name) { 374 sql::Connection* TopSitesDatabase::CreateDB(const base::FilePath& db_name) {
375 scoped_ptr<sql::Connection> db(new sql::Connection()); 375 scoped_ptr<sql::Connection> db(new sql::Connection());
376 // Settings copied from ThumbnailDatabase. 376 // Settings copied from ThumbnailDatabase.
377 db->set_error_histogram_name("Sqlite.Thumbnail.Error"); 377 db->set_histogram_tag("TopSites");
378 db->set_page_size(4096); 378 db->set_page_size(4096);
379 db->set_cache_size(32); 379 db->set_cache_size(32);
380 380
381 if (!db->Open(db_name)) { 381 if (!db->Open(db_name)) {
382 LOG(ERROR) << db->GetErrorMessage(); 382 LOG(ERROR) << db->GetErrorMessage();
383 return NULL; 383 return NULL;
384 } 384 }
385 385
386 return db.release(); 386 return db.release();
387 } 387 }
388 388
389 } // namespace history 389 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/thumbnail_database.cc ('k') | chrome/browser/net/sqlite_server_bound_cert_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698