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

Unified Diff: chrome/browser/history/in_memory_database.cc

Issue 9071014: Database usage adjustment for .../history (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/in_memory_database.cc
diff --git a/chrome/browser/history/in_memory_database.cc b/chrome/browser/history/in_memory_database.cc
index cf64b5a4f9c71a489d0229e4cea136695089d379..b4fedaa25e3c7beec35cc1d1a36e23d5065bc294 100644
--- a/chrome/browser/history/in_memory_database.cc
+++ b/chrome/browser/history/in_memory_database.cc
@@ -69,10 +69,6 @@ bool InMemoryDatabase::InitFromDisk(const FilePath& history_name) {
// Attach to the history database on disk. (We can't ATTACH in the middle of
// a transaction.)
sql::Statement attach(GetDB().GetUniqueStatement("ATTACH ? AS history"));
- if (!attach) {
- NOTREACHED() << "Unable to attach to history database.";
- return false;
- }
#if defined(OS_POSIX)
attach.BindString(0, history_name.value());
#else
@@ -100,7 +96,7 @@ bool InMemoryDatabase::InitFromDisk(const FilePath& history_name) {
// an average of only 35 rows).
sql::Statement visit_count(db_.GetUniqueStatement(
"SELECT sum(visit_count) FROM urls"));
- if (visit_count && visit_count.Step()) {
+ if (visit_count.Step()) {
UMA_HISTOGRAM_COUNTS("History.InMemoryTypedUrlVisitCount",
visit_count.ColumnInt(0));
}

Powered by Google App Engine
This is Rietveld 408576698