| 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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 "webkit/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 storage::SpecialStoragePolicy* special_storage_policy, |
| 33 DOMStorageTaskRunner* task_runner) | 33 DOMStorageTaskRunner* task_runner) |
| 34 : localstorage_directory_(localstorage_directory), | 34 : localstorage_directory_(localstorage_directory), |
| 35 sessionstorage_directory_(sessionstorage_directory), | 35 sessionstorage_directory_(sessionstorage_directory), |
| 36 task_runner_(task_runner), | 36 task_runner_(task_runner), |
| 37 is_shutdown_(false), | 37 is_shutdown_(false), |
| 38 force_keep_session_state_(false), | 38 force_keep_session_state_(false), |
| 39 special_storage_policy_(special_storage_policy), | 39 special_storage_policy_(special_storage_policy), |
| 40 scavenging_started_(false) { | 40 scavenging_started_(false) { |
| 41 // AtomicSequenceNum starts at 0 but we want to start session | 41 // AtomicSequenceNum starts at 0 but we want to start session |
| 42 // namespace ids at one since zero is reserved for the | 42 // namespace ids at one since zero is reserved for the |
| (...skipping 444 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 |