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_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
11 #include "base/guid.h" | 11 #include "base/guid.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "content/browser/dom_storage/dom_storage_area.h" | 14 #include "content/browser/dom_storage/dom_storage_area.h" |
15 #include "content/browser/dom_storage/dom_storage_database.h" | 15 #include "content/browser/dom_storage/dom_storage_database.h" |
16 #include "content/browser/dom_storage/dom_storage_namespace.h" | 16 #include "content/browser/dom_storage/dom_storage_namespace.h" |
17 #include "content/browser/dom_storage/dom_storage_task_runner.h" | 17 #include "content/browser/dom_storage/dom_storage_task_runner.h" |
18 #include "content/browser/dom_storage/session_storage_database.h" | 18 #include "content/browser/dom_storage/session_storage_database.h" |
19 #include "content/common/dom_storage/dom_storage_types.h" | 19 #include "content/common/dom_storage/dom_storage_types.h" |
20 #include "content/public/browser/dom_storage_context.h" | 20 #include "content/public/browser/dom_storage_context.h" |
21 #include "content/public/browser/local_storage_usage_info.h" | 21 #include "content/public/browser/local_storage_usage_info.h" |
22 #include "content/public/browser/session_storage_usage_info.h" | 22 #include "content/public/browser/session_storage_usage_info.h" |
23 #include "webkit/browser/quota/special_storage_policy.h" | 23 #include "storage/browser/quota/special_storage_policy.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 static const int kSessionStoraceScavengingSeconds = 60; | 27 static const int kSessionStoraceScavengingSeconds = 60; |
28 | 28 |
29 DOMStorageContextImpl::DOMStorageContextImpl( | 29 DOMStorageContextImpl::DOMStorageContextImpl( |
30 const base::FilePath& localstorage_directory, | 30 const base::FilePath& localstorage_directory, |
31 const base::FilePath& sessionstorage_directory, | 31 const base::FilePath& sessionstorage_directory, |
32 quota::SpecialStoragePolicy* special_storage_policy, | 32 quota::SpecialStoragePolicy* special_storage_policy, |
33 DOMStorageTaskRunner* task_runner) | 33 DOMStorageTaskRunner* task_runner) |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 return SessionStorageNamespace::MERGE_RESULT_NAMESPACE_NOT_FOUND; | 487 return SessionStorageNamespace::MERGE_RESULT_NAMESPACE_NOT_FOUND; |
488 DOMStorageNamespace* ns1 = it->second; | 488 DOMStorageNamespace* ns1 = it->second; |
489 it = namespaces_.find(namespace2_id); | 489 it = namespaces_.find(namespace2_id); |
490 if (it == namespaces_.end()) | 490 if (it == namespaces_.end()) |
491 return SessionStorageNamespace::MERGE_RESULT_NAMESPACE_NOT_FOUND; | 491 return SessionStorageNamespace::MERGE_RESULT_NAMESPACE_NOT_FOUND; |
492 DOMStorageNamespace* ns2 = it->second; | 492 DOMStorageNamespace* ns2 = it->second; |
493 return ns1->Merge(actually_merge, process_id, ns2, this); | 493 return ns1->Merge(actually_merge, process_id, ns2, this); |
494 } | 494 } |
495 | 495 |
496 } // namespace content | 496 } // namespace content |
OLD | NEW |