| 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/browser/dom_storage/dom_storage_context.h" | 5 #include "webkit/browser/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/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 | 204 |
| 205 void DomStorageContext::RemoveEventObserver(EventObserver* observer) { | 205 void DomStorageContext::RemoveEventObserver(EventObserver* observer) { |
| 206 event_observers_.RemoveObserver(observer); | 206 event_observers_.RemoveObserver(observer); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void DomStorageContext::NotifyItemSet( | 209 void DomStorageContext::NotifyItemSet( |
| 210 const DomStorageArea* area, | 210 const DomStorageArea* area, |
| 211 const base::string16& key, | 211 const base::string16& key, |
| 212 const base::string16& new_value, | 212 const base::string16& new_value, |
| 213 const NullableString16& old_value, | 213 const base::NullableString16& old_value, |
| 214 const GURL& page_url) { | 214 const GURL& page_url) { |
| 215 FOR_EACH_OBSERVER( | 215 FOR_EACH_OBSERVER( |
| 216 EventObserver, event_observers_, | 216 EventObserver, event_observers_, |
| 217 OnDomStorageItemSet(area, key, new_value, old_value, page_url)); | 217 OnDomStorageItemSet(area, key, new_value, old_value, page_url)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void DomStorageContext::NotifyItemRemoved( | 220 void DomStorageContext::NotifyItemRemoved( |
| 221 const DomStorageArea* area, | 221 const DomStorageArea* area, |
| 222 const base::string16& key, | 222 const base::string16& key, |
| 223 const base::string16& old_value, | 223 const base::string16& old_value, |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 if (!deletable_persistent_namespace_ids_.empty()) { | 413 if (!deletable_persistent_namespace_ids_.empty()) { |
| 414 task_runner_->PostDelayedTask( | 414 task_runner_->PostDelayedTask( |
| 415 FROM_HERE, base::Bind( | 415 FROM_HERE, base::Bind( |
| 416 &DomStorageContext::DeleteNextUnusedNamespace, | 416 &DomStorageContext::DeleteNextUnusedNamespace, |
| 417 this), | 417 this), |
| 418 base::TimeDelta::FromSeconds(kSessionStoraceScavengingSeconds)); | 418 base::TimeDelta::FromSeconds(kSessionStoraceScavengingSeconds)); |
| 419 } | 419 } |
| 420 } | 420 } |
| 421 | 421 |
| 422 } // namespace dom_storage | 422 } // namespace dom_storage |
| OLD | NEW |