| 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 WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
| 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 public: | 60 public: |
| 61 struct UsageInfo { | 61 struct UsageInfo { |
| 62 GURL origin; | 62 GURL origin; |
| 63 size_t data_size; | 63 size_t data_size; |
| 64 base::Time last_modified; | 64 base::Time last_modified; |
| 65 | 65 |
| 66 UsageInfo(); | 66 UsageInfo(); |
| 67 ~UsageInfo(); | 67 ~UsageInfo(); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 // An interface for observing LocalStorage events on the | 70 // An interface for observing Local and Session Storage events on the |
| 71 // background thread. | 71 // background thread. |
| 72 class EventObserver { | 72 class EventObserver { |
| 73 public: | 73 public: |
| 74 virtual void OnDomStorageItemSet( | 74 virtual void OnDomStorageItemSet( |
| 75 const DomStorageArea* area, | 75 const DomStorageArea* area, |
| 76 const string16& key, | 76 const string16& key, |
| 77 const string16& new_value, | 77 const string16& new_value, |
| 78 const NullableString16& old_value, // may be null on initial insert | 78 const NullableString16& old_value, // may be null on initial insert |
| 79 const GURL& page_url) = 0; | 79 const GURL& page_url) = 0; |
| 80 virtual void OnDomStorageItemRemoved( | 80 virtual void OnDomStorageItemRemoved( |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 bool is_shutdown_; | 193 bool is_shutdown_; |
| 194 bool clear_local_state_; | 194 bool clear_local_state_; |
| 195 bool save_session_state_; | 195 bool save_session_state_; |
| 196 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 196 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace dom_storage | 199 } // namespace dom_storage |
| 200 | 200 |
| 201 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ | 201 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ |
| OLD | NEW |