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

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: Simplify SQL Created 8 years, 11 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
« no previous file with comments | « chrome/browser/history/history_database.cc ('k') | chrome/browser/history/in_memory_url_index_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..24d4d30aa0a84fba6762a3986933b3b3f718029f 100644
--- a/chrome/browser/history/in_memory_database.cc
+++ b/chrome/browser/history/in_memory_database.cc
@@ -69,19 +69,13 @@ 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
attach.BindString(0, WideToUTF8(history_name.value()));
#endif
- if (!attach.Run()) {
- NOTREACHED() << GetDB().GetErrorMessage();
+ if (!attach.Run())
return false;
- }
// Copy URL data to memory.
base::TimeTicks begin_load = base::TimeTicks::Now();
@@ -100,7 +94,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));
}
« no previous file with comments | « chrome/browser/history/history_database.cc ('k') | chrome/browser/history/in_memory_url_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698