| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 30c73a5822f240339cc5ee61bd71d2964f562ea8..f8c4cb20d62bf320f2644152a5c3b214c72ce34a 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -167,6 +167,24 @@ FilePath GetMediaCachePath(const FilePath& base) {
|
| return base.Append(chrome::kMediaCacheDirname);
|
| }
|
|
|
| +void SaveSessionStateOnIOThread(
|
| + net::URLRequestContextGetter* url_request_context_getter) {
|
| + url_request_context_getter->GetURLRequestContext()->cookie_store()->
|
| + GetCookieMonster()->SaveSessionCookies();
|
| +}
|
| +
|
| +void RestoreSessionStateOnIOThread(
|
| + net::URLRequestContextGetter* url_request_context_getter) {
|
| + url_request_context_getter->GetURLRequestContext()->cookie_store()->
|
| + GetCookieMonster()->RestoreOldSessionCookies();
|
| +}
|
| +
|
| +void DiscardSessionStateOnIOThread(
|
| + net::URLRequestContextGetter* url_request_context_getter) {
|
| + url_request_context_getter->GetURLRequestContext()->cookie_store()->
|
| + GetCookieMonster()->DiscardOldSessionCookies();
|
| +}
|
| +
|
| } // namespace
|
|
|
| // static
|
| @@ -1551,6 +1569,27 @@ NetworkActionPredictor* ProfileImpl::GetNetworkActionPredictor() {
|
| return network_action_predictor_.get();
|
| }
|
|
|
| +void ProfileImpl::SaveSessionState() {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&SaveSessionStateOnIOThread,
|
| + make_scoped_refptr(GetRequestContext())));
|
| +}
|
| +
|
| +void ProfileImpl::RestoreSessionState() {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&RestoreSessionStateOnIOThread,
|
| + make_scoped_refptr(GetRequestContext())));
|
| +}
|
| +
|
| +void ProfileImpl::DiscardSessionState() {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&DiscardSessionStateOnIOThread,
|
| + make_scoped_refptr(GetRequestContext())));
|
| +}
|
| +
|
| SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
|
| if (!spellcheck_profile_.get())
|
| spellcheck_profile_.reset(new SpellCheckProfile(path_));
|
|
|