| 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/renderer/dom_storage/dom_storage_dispatcher.h" | 5 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 params.connection_id); | 305 params.connection_id); |
| 306 } else { | 306 } else { |
| 307 DOMStorageCachedArea* cached_area = proxy_->LookupCachedArea( | 307 DOMStorageCachedArea* cached_area = proxy_->LookupCachedArea( |
| 308 params.namespace_id, params.origin); | 308 params.namespace_id, params.origin); |
| 309 if (cached_area) | 309 if (cached_area) |
| 310 cached_area->ApplyMutation(params.key, params.new_value); | 310 cached_area->ApplyMutation(params.key, params.new_value); |
| 311 } | 311 } |
| 312 | 312 |
| 313 if (params.namespace_id == kLocalStorageNamespaceId) { | 313 if (params.namespace_id == kLocalStorageNamespaceId) { |
| 314 blink::WebStorageEventDispatcher::dispatchLocalStorageEvent( | 314 blink::WebStorageEventDispatcher::dispatchLocalStorageEvent( |
| 315 params.key, | 315 blink::WebString::fromUTF16(params.key), |
| 316 params.old_value, | 316 blink::WebString::fromUTF16(params.old_value), |
| 317 params.new_value, | 317 blink::WebString::fromUTF16(params.new_value), params.origin, |
| 318 params.origin, | 318 params.page_url, originating_area); |
| 319 params.page_url, | |
| 320 originating_area); | |
| 321 } else { | 319 } else { |
| 322 WebStorageNamespaceImpl | 320 WebStorageNamespaceImpl |
| 323 session_namespace_for_event_dispatch(params.namespace_id); | 321 session_namespace_for_event_dispatch(params.namespace_id); |
| 324 blink::WebStorageEventDispatcher::dispatchSessionStorageEvent( | 322 blink::WebStorageEventDispatcher::dispatchSessionStorageEvent( |
| 325 params.key, | 323 blink::WebString::fromUTF16(params.key), |
| 326 params.old_value, | 324 blink::WebString::fromUTF16(params.old_value), |
| 327 params.new_value, | 325 blink::WebString::fromUTF16(params.new_value), params.origin, |
| 328 params.origin, | 326 params.page_url, session_namespace_for_event_dispatch, |
| 329 params.page_url, | |
| 330 session_namespace_for_event_dispatch, | |
| 331 originating_area); | 327 originating_area); |
| 332 } | 328 } |
| 333 } | 329 } |
| 334 | 330 |
| 335 void DomStorageDispatcher::OnAsyncOperationComplete(bool success) { | 331 void DomStorageDispatcher::OnAsyncOperationComplete(bool success) { |
| 336 proxy_->CompleteOnePendingCallback(success); | 332 proxy_->CompleteOnePendingCallback(success); |
| 337 } | 333 } |
| 338 | 334 |
| 339 } // namespace content | 335 } // namespace content |
| OLD | NEW |