| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/browser/browser_thread.h" | 8 #include "content/browser/browser_thread.h" |
| 9 | 9 |
| 10 WebKitContext::WebKitContext( | 10 WebKitContext::WebKitContext( |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 BrowserThread::PostTask( | 59 BrowserThread::PostTask( |
| 60 BrowserThread::WEBKIT, FROM_HERE, | 60 BrowserThread::WEBKIT, FROM_HERE, |
| 61 NewRunnableMethod(this, &WebKitContext::DeleteDataModifiedSince, | 61 NewRunnableMethod(this, &WebKitContext::DeleteDataModifiedSince, |
| 62 cutoff)); | 62 cutoff)); |
| 63 return; | 63 return; |
| 64 } | 64 } |
| 65 | 65 |
| 66 dom_storage_context_->DeleteDataModifiedSince(cutoff); | 66 dom_storage_context_->DeleteDataModifiedSince(cutoff); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void WebKitContext::DeleteSessionOnlyData() { |
| 70 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)) { |
| 71 BrowserThread::PostTask( |
| 72 BrowserThread::WEBKIT, FROM_HERE, |
| 73 NewRunnableMethod(this, &WebKitContext::DeleteSessionOnlyData)); |
| 74 return; |
| 75 } |
| 76 |
| 77 dom_storage_context_->DeleteSessionOnlyData(); |
| 78 } |
| 69 | 79 |
| 70 void WebKitContext::DeleteSessionStorageNamespace( | 80 void WebKitContext::DeleteSessionStorageNamespace( |
| 71 int64 session_storage_namespace_id) { | 81 int64 session_storage_namespace_id) { |
| 72 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)) { | 82 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)) { |
| 73 BrowserThread::PostTask( | 83 BrowserThread::PostTask( |
| 74 BrowserThread::WEBKIT, FROM_HERE, | 84 BrowserThread::WEBKIT, FROM_HERE, |
| 75 NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace, | 85 NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace, |
| 76 session_storage_namespace_id)); | 86 session_storage_namespace_id)); |
| 77 return; | 87 return; |
| 78 } | 88 } |
| 79 | 89 |
| 80 dom_storage_context_->DeleteSessionStorageNamespace( | 90 dom_storage_context_->DeleteSessionStorageNamespace( |
| 81 session_storage_namespace_id); | 91 session_storage_namespace_id); |
| 82 } | 92 } |
| OLD | NEW |