summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/expire_history_backend.cc6
-rw-r--r--chrome/browser/history/history_backend.cc7
-rw-r--r--chrome/browser/history/redirect_uitest.cc6
-rw-r--r--chrome/browser/history/text_database_manager.cc18
4 files changed, 19 insertions, 18 deletions
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index 3da7271..2a749dd 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -592,7 +592,7 @@ void ExpireHistoryBackend::ScheduleArchive() {
FROM_HERE,
base::Bind(&ExpireHistoryBackend::DoArchiveIteration,
weak_factory_.GetWeakPtr()),
- delay);
+ delay.InMilliseconds());
}
void ExpireHistoryBackend::DoArchiveIteration() {
@@ -687,7 +687,7 @@ void ExpireHistoryBackend::ScheduleExpireHistoryIndexFiles() {
FROM_HERE,
base::Bind(&ExpireHistoryBackend::DoExpireHistoryIndexFiles,
weak_factory_.GetWeakPtr()),
- delay);
+ delay.InMilliseconds());
}
void ExpireHistoryBackend::DoExpireHistoryIndexFiles() {
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index d79fa6a..defc2f3 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -71,8 +71,9 @@ namespace history {
// dependency between MostVisitedModel and the history backend.
static const int kSegmentDataRetention = 90;
-// How long we'll wait to do a commit, so that things are batched together.
-static const int kCommitIntervalSeconds = 10;
+// The number of milliseconds we'll wait to do a commit, so that things are
+// batched together.
+static const int kCommitIntervalMs = 10000;
// The amount of time before we re-fetch the favicon.
static const int kFaviconRefetchDays = 7;
@@ -1941,7 +1942,7 @@ void HistoryBackend::ScheduleCommit() {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CommitLaterTask::RunCommit, scheduled_commit_.get()),
- base::TimeDelta::FromSeconds(kCommitIntervalSeconds));
+ kCommitIntervalMs);
}
void HistoryBackend::CancelScheduledCommit() {
diff --git a/chrome/browser/history/redirect_uitest.cc b/chrome/browser/history/redirect_uitest.cc
index 964fee3..85126a1 100644
--- a/chrome/browser/history/redirect_uitest.cc
+++ b/chrome/browser/history/redirect_uitest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -214,7 +214,7 @@ TEST_F(RedirectTest, ClientServerServer) {
NavigateToURL(first_url);
for (int i = 0; i < 10; ++i) {
- base::PlatformThread::Sleep(TestTimeouts::action_timeout());
+ base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
ASSERT_TRUE(tab_proxy.get());
ASSERT_TRUE(tab_proxy->GetRedirectsFrom(first_url, &redirects));
@@ -322,7 +322,7 @@ TEST_F(RedirectTest,
std::wstring final_url_title = UTF8ToWide("Title Of Awesomeness");
// Wait till the final page has been loaded.
for (int i = 0; i < 10; ++i) {
- base::PlatformThread::Sleep(TestTimeouts::action_timeout());
+ base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
ASSERT_TRUE(tab_proxy.get());
ASSERT_TRUE(tab_proxy->GetTabTitle(&tab_title));
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index 499e3e1..98e5990 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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 kExpirationSeconds = 20;
+const int kExpirationSec = 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_ > base::TimeDelta::FromSeconds(kExpirationSeconds);
+ return now - added_time_ > TimeDelta::FromSeconds(kExpirationSec);
}
// 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
- // kExpirationSeconds yet we got a body in less than that time, since
- // the title should always come in first.
+ // kExpirationSec 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 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.
+ // 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.
//
// 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()),
- base::TimeDelta::FromSeconds(kExpirationSeconds));
+ kExpirationSec * Time::kMillisecondsPerSecond);
}
void TextDatabaseManager::FlushOldChanges() {