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

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

Issue 898473003: Revert of Remove dependency of HistoryService on WebHistoryServiceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@schedule-and-forget
Patch Set: Created 5 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_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index 4bd09f9d242b535e33dbc14e7ce159741a07f753..d70d45ad31b81bef49961d4b55dde6952d234ac0 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/in_memory_history_backend.h"
#include "chrome/browser/history/in_memory_url_index.h"
+#include "chrome/browser/history/web_history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
@@ -1165,7 +1166,6 @@
}
void HistoryService::ExpireLocalAndRemoteHistoryBetween(
- history::WebHistoryService* web_history,
const std::set<GURL>& restrict_urls,
Time begin_time,
Time end_time,
@@ -1174,6 +1174,8 @@
// TODO(dubroy): This should be factored out into a separate class that
// dispatches deletions to the proper places.
+ history::WebHistoryService* web_history =
+ WebHistoryServiceFactory::GetForProfile(profile_);
if (web_history) {
// TODO(dubroy): This API does not yet support deletion of specific URLs.
DCHECK(restrict_urls.empty());
@@ -1186,8 +1188,9 @@
//
// TODO(davidben): |callback| should not run until this operation completes
// too.
- web_history->ExpireHistoryBetween(restrict_urls, begin_time, end_time,
- base::Bind(&ExpireWebHistoryComplete));
+ web_history->ExpireHistoryBetween(
+ restrict_urls, begin_time, end_time,
+ base::Bind(&ExpireWebHistoryComplete));
}
ExpireHistoryBetween(restrict_urls, begin_time, end_time, callback, tracker);
}
« no previous file with comments | « chrome/browser/history/history_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698