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

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

Issue 113591: Fix Acid3 Test 48: LINKTEST, Chromium side.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Made waiting more bearable. Created 11 years, 6 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.h ('k') | chrome/browser/history/redirect_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_database.cc
===================================================================
--- chrome/browser/history/history_database.cc (revision 19822)
+++ chrome/browser/history/history_database.cc (working copy)
@@ -10,6 +10,8 @@
#include "base/string_util.h"
#include "chrome/common/sqlite_utils.h"
+using base::Time;
+
namespace history {
namespace {
@@ -17,6 +19,7 @@
// Current version number.
static const int kCurrentVersionNumber = 16;
static const int kCompatibleVersionNumber = 16;
+static const char kEarlyExpirationThresholdKey[] = "early_expiration_threshold";
} // namespace
@@ -171,6 +174,27 @@
return 0;
}
+Time HistoryDatabase::GetEarlyExpirationThreshold() {
+ if (!cached_early_expiration_threshold_.is_null())
+ return cached_early_expiration_threshold_;
+
+ int64 threshold;
+ if (!meta_table_.GetValue(kEarlyExpirationThresholdKey, &threshold)) {
+ // Set to a very early non-zero time, so it's before all history, but not
+ // zero to avoid re-retrieval.
+ threshold = 1L;
+ }
+
+ cached_early_expiration_threshold_ = Time::FromInternalValue(threshold);
+ return cached_early_expiration_threshold_;
+}
+
+void HistoryDatabase::UpdateEarlyExpirationThreshold(Time threshold) {
+ meta_table_.SetValue(kEarlyExpirationThresholdKey,
+ threshold.ToInternalValue());
+ cached_early_expiration_threshold_ = threshold;
+}
+
sqlite3* HistoryDatabase::GetDB() {
return db_;
}
« no previous file with comments | « chrome/browser/history/history_database.h ('k') | chrome/browser/history/redirect_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698