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

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

Issue 9185026: Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Explicitly include base/time.h in header file. 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/redirect_uitest.cc ('k') | chrome/browser/images_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/text_database_manager.cc
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index 98e5990cd745c9183abf67ec5d780aa7baf9ac23..bdad9989a9b94a542696cecfe5b730967702fed9 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -33,7 +33,7 @@ std::string ConvertStringForIndexer(const string16& input) {
// Data older than this will be committed to the full text index even if we
// haven't gotten a title and/or body.
-const int kExpirationSec = 20;
+const int kExpirationSeconds = 20;
} // namespace
@@ -71,7 +71,7 @@ void TextDatabaseManager::PageInfo::set_body(const string16& bdy) {
}
bool TextDatabaseManager::PageInfo::Expired(TimeTicks now) const {
- return now - added_time_ > TimeDelta::FromSeconds(kExpirationSec);
+ return now - added_time_ > base::TimeDelta::FromSeconds(kExpirationSeconds);
}
// TextDatabaseManager ---------------------------------------------------------
@@ -208,8 +208,8 @@ void TextDatabaseManager::AddPageTitle(const GURL& url,
// not worth it for this edge case.
//
// It will be almost impossible for the title to take longer than
- // kExpirationSec yet we got a body in less than that time, since the
- // title should always come in first.
+ // kExpirationSeconds yet we got a body in less than that time, since
+ // the title should always come in first.
return;
}
@@ -235,9 +235,9 @@ void TextDatabaseManager::AddPageContents(const GURL& url,
RecentChangeList::iterator found = recent_changes_.Peek(url);
if (found == recent_changes_.end()) {
// This page is not in our cache of recent pages. This means that the page
- // took more than kExpirationSec to load. Often, this will be the result of
- // a very slow iframe or other resource on the page that makes us think its
- // still loading.
+ // took more than kExpirationSeconds to load. Often, this will be the result
+ // of a very slow iframe or other resource on the page that makes us think
+ // its still loading.
//
// As a fallback, set the most recent visit's contents using the input, and
// use the last set title in the URL table as the title to index.
@@ -538,7 +538,7 @@ void TextDatabaseManager::ScheduleFlushOldChanges() {
FROM_HERE,
base::Bind(&TextDatabaseManager::FlushOldChanges,
weak_factory_.GetWeakPtr()),
- kExpirationSec * Time::kMillisecondsPerSecond);
+ base::TimeDelta::FromSeconds(kExpirationSeconds));
}
void TextDatabaseManager::FlushOldChanges() {
« no previous file with comments | « chrome/browser/history/redirect_uitest.cc ('k') | chrome/browser/images_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698