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_message_filter.h" | 5 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/nullable_string16.h" | 9 #include "base/nullable_string16.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 NullableString16(true)); | 231 NullableString16(true)); |
232 } | 232 } |
233 | 233 |
234 void DOMStorageMessageFilter::SendDomStorageEvent( | 234 void DOMStorageMessageFilter::SendDomStorageEvent( |
235 const dom_storage::DomStorageArea* area, | 235 const dom_storage::DomStorageArea* area, |
236 const GURL& page_url, | 236 const GURL& page_url, |
237 const NullableString16& key, | 237 const NullableString16& key, |
238 const NullableString16& new_value, | 238 const NullableString16& new_value, |
239 const NullableString16& old_value) { | 239 const NullableString16& old_value) { |
240 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); | 240 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); |
241 DCHECK(area); | |
jam
2012/04/26 01:03:56
nit: this is redundant since if it's null a crash
michaeln
2012/04/26 01:20:38
Done.
| |
241 DOMStorageMsg_Event_Params params; | 242 DOMStorageMsg_Event_Params params; |
242 params.origin = area->origin(); | 243 params.origin = area->origin(); |
243 params.page_url = page_url; | 244 params.page_url = page_url; |
244 params.connection_id = connection_dispatching_message_for_; | 245 params.connection_id = connection_dispatching_message_for_; |
245 params.key = key; | 246 params.key = key; |
246 params.new_value = new_value; | 247 params.new_value = new_value; |
247 params.old_value = old_value; | 248 params.old_value = old_value; |
249 params.namespace_id = area->namespace_id(); | |
248 Send(new DOMStorageMsg_Event(params)); | 250 Send(new DOMStorageMsg_Event(params)); |
249 } | 251 } |
OLD | NEW |