| 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 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // If |data_path| is empty, nothing will be saved to disk. | 30 // If |data_path| is empty, nothing will be saved to disk. |
| 31 DOMStorageContextImpl(const FilePath& data_path, | 31 DOMStorageContextImpl(const FilePath& data_path, |
| 32 quota::SpecialStoragePolicy* special_storage_policy); | 32 quota::SpecialStoragePolicy* special_storage_policy); |
| 33 | 33 |
| 34 // DOMStorageContext implementation. | 34 // DOMStorageContext implementation. |
| 35 virtual void GetAllStorageFiles( | 35 virtual void GetAllStorageFiles( |
| 36 const GetAllStorageFilesCallback& callback) OVERRIDE; | 36 const GetAllStorageFilesCallback& callback) OVERRIDE; |
| 37 virtual FilePath GetFilePath(const string16& origin_id) const OVERRIDE; | 37 virtual FilePath GetFilePath(const string16& origin_id) const OVERRIDE; |
| 38 virtual void DeleteForOrigin(const string16& origin_id) OVERRIDE; | 38 virtual void DeleteForOrigin(const string16& origin_id) OVERRIDE; |
| 39 virtual void DeleteLocalStorageFile(const FilePath& file_path) OVERRIDE; | 39 virtual void DeleteLocalStorageFile(const FilePath& file_path) OVERRIDE; |
| 40 virtual void DeleteDataModifiedSince(const base::Time& cutoff) OVERRIDE; | 40 virtual void DeleteDataModifiedSince(const base::Time& cutoff, |
| 41 int origin_set_mask) OVERRIDE; |
| 41 | 42 |
| 42 // Called to free up memory that's not strictly needed. | 43 // Called to free up memory that's not strictly needed. |
| 43 void PurgeMemory(); | 44 void PurgeMemory(); |
| 44 | 45 |
| 45 // Used by content settings to alter the behavior around | 46 // Used by content settings to alter the behavior around |
| 46 // what data to keep and what data to discard at shutdown. | 47 // what data to keep and what data to discard at shutdown. |
| 47 // The policy is not so straight forward to describe, see | 48 // The policy is not so straight forward to describe, see |
| 48 // the implementation for details. | 49 // the implementation for details. |
| 49 void SetClearLocalState(bool clear_local_state); | 50 void SetClearLocalState(bool clear_local_state); |
| 50 void SaveSessionState(); | 51 void SaveSessionState(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 virtual ~DOMStorageContextImpl(); | 65 virtual ~DOMStorageContextImpl(); |
| 65 dom_storage::DomStorageContext* context() const { return context_.get(); } | 66 dom_storage::DomStorageContext* context() const { return context_.get(); } |
| 66 | 67 |
| 67 scoped_refptr<dom_storage::DomStorageContext> context_; | 68 scoped_refptr<dom_storage::DomStorageContext> context_; |
| 68 | 69 |
| 69 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); | 70 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 73 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| OLD | NEW |