Commit 29dd4704 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

Renames HistoryService::DeleteURLsForTest to HistoryService::DeleteURLs

This method is almost identical to HistoryService::DeleteURL and nothing
about it makes it suitable for testing only.

Change-Id: I5516c6fb514b72b9fb22f7b9cba34fdaf6001b00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825466Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700366}
parent 5c20d5d9
...@@ -395,11 +395,11 @@ void DeleteUrlFromHistory(int index, const GURL& url) { ...@@ -395,11 +395,11 @@ void DeleteUrlFromHistory(int index, const GURL& url) {
} }
void DeleteUrlsFromHistory(int index, const std::vector<GURL>& urls) { void DeleteUrlsFromHistory(int index, const std::vector<GURL>& urls) {
GetHistoryServiceFromClient(index)->DeleteURLsForTest(urls); GetHistoryServiceFromClient(index)->DeleteURLs(urls);
if (test()->use_verifier()) if (test()->use_verifier())
HistoryServiceFactory::GetForProfile(test()->verifier(), HistoryServiceFactory::GetForProfile(test()->verifier(),
ServiceAccessType::IMPLICIT_ACCESS) ServiceAccessType::IMPLICIT_ACCESS)
->DeleteURLsForTest(urls); ->DeleteURLs(urls);
WaitForHistoryDBThread(index); WaitForHistoryDBThread(index);
} }
......
...@@ -1015,11 +1015,11 @@ void HistoryService::DeleteURL(const GURL& url) { ...@@ -1015,11 +1015,11 @@ void HistoryService::DeleteURL(const GURL& url) {
history_backend_, url)); history_backend_, url));
} }
void HistoryService::DeleteURLsForTest(const std::vector<GURL>& urls) { void HistoryService::DeleteURLs(const std::vector<GURL>& urls) {
TRACE_EVENT0("browser", "HistoryService::DeleteURLs");
DCHECK(backend_task_runner_) << "History service being called after cleanup"; DCHECK(backend_task_runner_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
// We will update the visited links when we observe the delete // We will update the visited links when we observe the delete notifications.
// notifications.
ScheduleTask(PRIORITY_NORMAL, base::BindOnce(&HistoryBackend::DeleteURLs, ScheduleTask(PRIORITY_NORMAL, base::BindOnce(&HistoryBackend::DeleteURLs,
history_backend_, urls)); history_backend_, urls));
} }
......
...@@ -322,7 +322,7 @@ class HistoryService : public KeyedService { ...@@ -322,7 +322,7 @@ class HistoryService : public KeyedService {
// Delete all the information related to a list of urls. (Deleting // Delete all the information related to a list of urls. (Deleting
// URLs one by one is slow as it has to flush to disk each time.) // URLs one by one is slow as it has to flush to disk each time.)
void DeleteURLsForTest(const std::vector<GURL>& urls); void DeleteURLs(const std::vector<GURL>& urls);
// Removes all visits in the selected time range (including the // Removes all visits in the selected time range (including the
// start time), updating the URLs accordingly. This deletes any // start time), updating the URLs accordingly. This deletes any
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment