| Index: components/history/core/browser/history_backend.cc
|
| diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
|
| index c35e8c40923ec7034039b733ac5cb1552acc159d..a1fdba9652e622ae13848bb9c8f637029e95f0ab 100644
|
| --- a/components/history/core/browser/history_backend.cc
|
| +++ b/components/history/core/browser/history_backend.cc
|
| @@ -44,6 +44,10 @@
|
| #include "url/gurl.h"
|
| #include "url/url_constants.h"
|
|
|
| +#if defined(OS_IOS)
|
| +#include "base/ios/scoped_critical_action.h"
|
| +#endif
|
| +
|
| using base::Time;
|
| using base::TimeDelta;
|
| using base::TimeTicks;
|
| @@ -260,6 +264,12 @@ void HistoryBackend::Closing() {
|
| delegate_.reset();
|
| }
|
|
|
| +#if defined(OS_IOS)
|
| +void HistoryBackend::PersistState() {
|
| + Commit();
|
| +}
|
| +#endif
|
| +
|
| void HistoryBackend::ClearCachedDataForContextID(ContextID context_id) {
|
| tracker_.ClearCachedDataForContextID(context_id);
|
| }
|
| @@ -2168,6 +2178,12 @@ void HistoryBackend::Commit() {
|
| if (!db_)
|
| return;
|
|
|
| +#if defined(OS_IOS)
|
| + // Attempts to get the application running long enough to commit the database
|
| + // transaction if it is currently being backgrounded.
|
| + base::ios::ScopedCriticalAction scoped_critical_action;
|
| +#endif
|
| +
|
| // Note that a commit may not actually have been scheduled if a caller
|
| // explicitly calls this instead of using ScheduleCommit. Likewise, we
|
| // may reset the flag written by a pending commit. But this is OK! It
|
|
|