| Index: components/history/core/browser/history_service.cc
|
| diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
|
| index 05dff7d65e311d990d9da895c68266d4016fd35b..296f833aded3c5ddf8d4b8396e3a84e7f87824ae 100644
|
| --- a/components/history/core/browser/history_service.cc
|
| +++ b/components/history/core/browser/history_service.cc
|
| @@ -46,6 +46,10 @@
|
| #include "sync/api/sync_error_factory.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
|
|
| +#if defined(OS_IOS)
|
| +#include "base/critical_closure.h"
|
| +#endif
|
| +
|
| using base::Time;
|
|
|
| namespace history {
|
| @@ -205,6 +209,17 @@ bool HistoryService::BackendLoaded() {
|
| return backend_loaded_;
|
| }
|
|
|
| +#if defined(OS_IOS)
|
| +void HistoryService::HandleBackgrounding() {
|
| + if (!thread_ || !history_backend_.get())
|
| + return;
|
| +
|
| + ScheduleTask(PRIORITY_NORMAL,
|
| + base::MakeCriticalClosure(base::Bind(
|
| + &HistoryBackend::PersistState, history_backend_.get())));
|
| +}
|
| +#endif
|
| +
|
| void HistoryService::ClearCachedDataForContextID(ContextID context_id) {
|
| DCHECK(thread_) << "History service being called after cleanup";
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|