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 "webkit/dom_storage/dom_storage_context.h" | 5 #include "webkit/dom_storage/dom_storage_context.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/guid.h" | 10 #include "base/guid.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "webkit/browser/quota/special_storage_policy.h" |
13 #include "webkit/dom_storage/dom_storage_area.h" | 14 #include "webkit/dom_storage/dom_storage_area.h" |
14 #include "webkit/dom_storage/dom_storage_database.h" | 15 #include "webkit/dom_storage/dom_storage_database.h" |
15 #include "webkit/dom_storage/dom_storage_namespace.h" | 16 #include "webkit/dom_storage/dom_storage_namespace.h" |
16 #include "webkit/dom_storage/dom_storage_task_runner.h" | 17 #include "webkit/dom_storage/dom_storage_task_runner.h" |
17 #include "webkit/dom_storage/dom_storage_types.h" | 18 #include "webkit/dom_storage/dom_storage_types.h" |
18 #include "webkit/dom_storage/session_storage_database.h" | 19 #include "webkit/dom_storage/session_storage_database.h" |
19 #include "webkit/quota/special_storage_policy.h" | |
20 | 20 |
21 using file_util::FileEnumerator; | 21 using file_util::FileEnumerator; |
22 | 22 |
23 namespace dom_storage { | 23 namespace dom_storage { |
24 | 24 |
25 static const int kSessionStoraceScavengingSeconds = 60; | 25 static const int kSessionStoraceScavengingSeconds = 60; |
26 | 26 |
27 DomStorageContext::DomStorageContext( | 27 DomStorageContext::DomStorageContext( |
28 const base::FilePath& localstorage_directory, | 28 const base::FilePath& localstorage_directory, |
29 const base::FilePath& sessionstorage_directory, | 29 const base::FilePath& sessionstorage_directory, |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 if (!deletable_persistent_namespace_ids_.empty()) { | 415 if (!deletable_persistent_namespace_ids_.empty()) { |
416 task_runner_->PostDelayedTask( | 416 task_runner_->PostDelayedTask( |
417 FROM_HERE, base::Bind( | 417 FROM_HERE, base::Bind( |
418 &DomStorageContext::DeleteNextUnusedNamespace, | 418 &DomStorageContext::DeleteNextUnusedNamespace, |
419 this), | 419 this), |
420 base::TimeDelta::FromSeconds(kSessionStoraceScavengingSeconds)); | 420 base::TimeDelta::FromSeconds(kSessionStoraceScavengingSeconds)); |
421 } | 421 } |
422 } | 422 } |
423 | 423 |
424 } // namespace dom_storage | 424 } // namespace dom_storage |
OLD | NEW |