| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 63         BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, | 63         BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, | 
| 64         base::Bind(&WebKitContext::DeleteDataModifiedSince, this, cutoff)); | 64         base::Bind(&WebKitContext::DeleteDataModifiedSince, this, cutoff)); | 
| 65     return; | 65     return; | 
| 66   } | 66   } | 
| 67 | 67 | 
| 68   dom_storage_context_->DeleteDataModifiedSince(cutoff); | 68   dom_storage_context_->DeleteDataModifiedSince(cutoff); | 
| 69 } | 69 } | 
| 70 | 70 | 
| 71 void WebKitContext::DeleteSessionStorageNamespace( | 71 void WebKitContext::DeleteSessionStorageNamespace( | 
| 72     int64 session_storage_namespace_id) { | 72     int64 session_storage_namespace_id) { | 
| 73   if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) { | 73   if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED) && | 
| 74     BrowserThread::PostTask( | 74       BrowserThread::PostTask( | 
| 75         BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, | 75           BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, | 
| 76         base::Bind(&WebKitContext::DeleteSessionStorageNamespace, this, | 76           base::Bind(&WebKitContext::DeleteSessionStorageNamespace, this, | 
| 77                    session_storage_namespace_id)); | 77               session_storage_namespace_id))) { | 
| 78     return; | 78     return; | 
| 79   } | 79   } | 
| 80 | 80 | 
| 81   dom_storage_context_->DeleteSessionStorageNamespace( | 81   dom_storage_context_->DeleteSessionStorageNamespace( | 
| 82       session_storage_namespace_id); | 82       session_storage_namespace_id); | 
| 83 } | 83 } | 
| 84 | 84 | 
| 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 } | 
| OLD | NEW | 
|---|