| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/dom_storage/dom_storage_context_impl.h" | 5 #include "content/browser/dom_storage/dom_storage_context_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 new std::vector<DomStorageContext::UsageInfo>; | 40 new std::vector<DomStorageContext::UsageInfo>; |
| 41 context->GetUsageInfo(infos, true); | 41 context->GetUsageInfo(infos, true); |
| 42 reply_loop->PostTask( | 42 reply_loop->PostTask( |
| 43 FROM_HERE, | 43 FROM_HERE, |
| 44 base::Bind(&InvokeUsageInfoCallbackHelper, | 44 base::Bind(&InvokeUsageInfoCallbackHelper, |
| 45 callback, base::Owned(infos))); | 45 callback, base::Owned(infos))); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 namespace content { |
| 51 CONTENT_EXPORT void SetWeirdInt(int val) { |
| 52 LOG(ERROR) << "content setting it, addr " |
| 53 << &DomStorageArea::set_me << ", set to " << val; |
| 54 DomStorageArea::set_me = val; |
| 55 } |
| 56 } |
| 57 |
| 50 DOMStorageContextImpl::DOMStorageContextImpl( | 58 DOMStorageContextImpl::DOMStorageContextImpl( |
| 51 const FilePath& data_path, | 59 const FilePath& data_path, |
| 52 quota::SpecialStoragePolicy* special_storage_policy) { | 60 quota::SpecialStoragePolicy* special_storage_policy) { |
| 53 base::SequencedWorkerPool* worker_pool = BrowserThread::GetBlockingPool(); | 61 base::SequencedWorkerPool* worker_pool = BrowserThread::GetBlockingPool(); |
| 54 context_ = new dom_storage::DomStorageContext( | 62 context_ = new dom_storage::DomStorageContext( |
| 55 data_path.empty() ? | 63 data_path.empty() ? |
| 56 data_path : data_path.AppendASCII(kLocalStorageDirectory), | 64 data_path : data_path.AppendASCII(kLocalStorageDirectory), |
| 57 data_path.empty() ? | 65 data_path.empty() ? |
| 58 data_path : data_path.AppendASCII(kSessionStorageDirectory), | 66 data_path : data_path.AppendASCII(kSessionStorageDirectory), |
| 59 special_storage_policy, | 67 special_storage_policy, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 base::Bind(&DomStorageContext::SetForceKeepSessionState, context_)); | 130 base::Bind(&DomStorageContext::SetForceKeepSessionState, context_)); |
| 123 } | 131 } |
| 124 | 132 |
| 125 void DOMStorageContextImpl::Shutdown() { | 133 void DOMStorageContextImpl::Shutdown() { |
| 126 DCHECK(context_); | 134 DCHECK(context_); |
| 127 context_->task_runner()->PostShutdownBlockingTask( | 135 context_->task_runner()->PostShutdownBlockingTask( |
| 128 FROM_HERE, | 136 FROM_HERE, |
| 129 DomStorageTaskRunner::PRIMARY_SEQUENCE, | 137 DomStorageTaskRunner::PRIMARY_SEQUENCE, |
| 130 base::Bind(&DomStorageContext::Shutdown, context_)); | 138 base::Bind(&DomStorageContext::Shutdown, context_)); |
| 131 } | 139 } |
| OLD | NEW |