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/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "content/common/dom_storage_messages.h" | 12 #include "content/common/dom_storage_messages.h" |
13 #include "content/renderer/dom_storage/webstoragearea_impl.h" | 13 #include "content/renderer/dom_storage/webstoragearea_impl.h" |
14 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 14 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
15 #include "content/renderer/render_thread_impl.h" | 15 #include "content/renderer/render_thread_impl.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo
rmSupport.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo
rmSupport.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" |
19 #include "webkit/dom_storage/dom_storage_cached_area.h" | 19 #include "webkit/dom_storage/dom_storage_cached_area.h" |
20 #include "webkit/dom_storage/dom_storage_proxy.h" | 20 #include "webkit/dom_storage/dom_storage_proxy.h" |
21 #include "webkit/dom_storage/dom_storage_types.h" | 21 #include "webkit/dom_storage/dom_storage_types.h" |
22 | 22 |
23 using dom_storage::DomStorageCachedArea; | 23 using dom_storage::DomStorageCachedArea; |
24 using dom_storage::DomStorageProxy; | 24 using dom_storage::DomStorageProxy; |
25 using dom_storage::ValuesMap; | 25 using dom_storage::ValuesMap; |
26 | 26 |
| 27 namespace content { |
| 28 |
27 namespace { | 29 namespace { |
28 // MessageThrottlingFilter ------------------------------------------- | 30 // MessageThrottlingFilter ------------------------------------------- |
29 // Used to limit the number of ipc messages pending completion so we | 31 // Used to limit the number of ipc messages pending completion so we |
30 // don't overwhelm the main browser process. When the limit is reached, | 32 // don't overwhelm the main browser process. When the limit is reached, |
31 // a synchronous message is sent to flush all pending messages thru. | 33 // a synchronous message is sent to flush all pending messages thru. |
32 // We expect to receive an 'ack' for each message sent. This object | 34 // We expect to receive an 'ack' for each message sent. This object |
33 // observes receipt of the acks on the IPC thread to decrement a counter. | 35 // observes receipt of the acks on the IPC thread to decrement a counter. |
34 class MessageThrottlingFilter : public IPC::ChannelProxy::MessageFilter { | 36 class MessageThrottlingFilter : public IPC::ChannelProxy::MessageFilter { |
35 public: | 37 public: |
36 explicit MessageThrottlingFilter(RenderThreadImpl* sender) | 38 explicit MessageThrottlingFilter(RenderThreadImpl* sender) |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 params.page_url, | 329 params.page_url, |
328 session_namespace_for_event_dispatch, | 330 session_namespace_for_event_dispatch, |
329 originating_area, | 331 originating_area, |
330 originated_in_process); | 332 originated_in_process); |
331 } | 333 } |
332 } | 334 } |
333 | 335 |
334 void DomStorageDispatcher::OnAsyncOperationComplete(bool success) { | 336 void DomStorageDispatcher::OnAsyncOperationComplete(bool success) { |
335 proxy_->CompleteOnePendingCallback(success); | 337 proxy_->CompleteOnePendingCallback(success); |
336 } | 338 } |
| 339 |
| 340 } // namespace content |
OLD | NEW |