| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/in_process_webkit/webkit_context.h" | 5 #include "content/browser/in_process_webkit/webkit_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void WebKitContext::SaveSessionState() { | 85 void WebKitContext::SaveSessionState() { |
| 86 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) { | 86 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) { |
| 87 BrowserThread::PostTask( | 87 BrowserThread::PostTask( |
| 88 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, | 88 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, |
| 89 base::Bind(&WebKitContext::SaveSessionState, this)); | 89 base::Bind(&WebKitContext::SaveSessionState, this)); |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 dom_storage_context_->SaveSessionState(); | 92 dom_storage_context_->SaveSessionState(); |
| 93 indexed_db_context_->SaveSessionState(); | 93 indexed_db_context_->SaveSessionState(); |
| 94 } | 94 } |
| 95 |
| 96 void WebKitContext::DeleteUnneededSessionStorages( |
| 97 const std::set<std::string>& needed_session_storages) { |
| 98 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) { |
| 99 BrowserThread::PostTask( |
| 100 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, |
| 101 base::Bind(&WebKitContext::DeleteUnneededSessionStorages, this, |
| 102 needed_session_storages)); |
| 103 return; |
| 104 } |
| 105 |
| 106 dom_storage_context_->DeleteUnneededSessionStorages(needed_session_storages); |
| 107 } |
| OLD | NEW |