Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: mojo/public/cpp/bindings/interface_endpoint_client.h

Issue 2611843004: Implement throttling behavior for LocalStorage mojo messages.
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 DCHECK(thread_checker_.CalledOnValidThread()); 70 DCHECK(thread_checker_.CalledOnValidThread());
71 return encountered_error_; 71 return encountered_error_;
72 } 72 }
73 73
74 // Returns true if this endpoint has any pending callbacks. 74 // Returns true if this endpoint has any pending callbacks.
75 bool has_pending_responders() const { 75 bool has_pending_responders() const {
76 DCHECK(thread_checker_.CalledOnValidThread()); 76 DCHECK(thread_checker_.CalledOnValidThread());
77 return !async_responders_.empty() || !sync_responses_.empty(); 77 return !async_responders_.empty() || !sync_responses_.empty();
78 } 78 }
79 79
80 size_t pending_responder_count() const {
81 DCHECK(thread_checker_.CalledOnValidThread());
82 return async_responders_.size();
83 }
84
80 AssociatedGroupController* group_controller() const { 85 AssociatedGroupController* group_controller() const {
81 return handle_.group_controller(); 86 return handle_.group_controller();
82 } 87 }
83 AssociatedGroup* associated_group(); 88 AssociatedGroup* associated_group();
84 uint32_t interface_id() const; 89 uint32_t interface_id() const;
85 90
86 // Adds a MessageReceiver which can filter a message after validation but 91 // Adds a MessageReceiver which can filter a message after validation but
87 // before dispatch. 92 // before dispatch.
88 void AddFilter(std::unique_ptr<MessageReceiver> filter); 93 void AddFilter(std::unique_ptr<MessageReceiver> filter);
89 94
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 base::ThreadChecker thread_checker_; 186 base::ThreadChecker thread_checker_;
182 187
183 base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_; 188 base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_;
184 189
185 DISALLOW_COPY_AND_ASSIGN(InterfaceEndpointClient); 190 DISALLOW_COPY_AND_ASSIGN(InterfaceEndpointClient);
186 }; 191 };
187 192
188 } // namespace mojo 193 } // namespace mojo
189 194
190 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ 195 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_
OLDNEW
« no previous file with comments | « content/renderer/dom_storage/local_storage_cached_area.cc ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698