| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_CHILD_QUOTA_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_CHILD_QUOTA_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_CHILD_QUOTA_MESSAGE_FILTER_H_ | 6 #define CONTENT_CHILD_QUOTA_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" |
| 10 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
| 11 #include "content/child/worker_thread_message_filter.h" | 12 #include "content/child/worker_thread_message_filter.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 class QuotaMessageFilter : public WorkerThreadMessageFilter { | 16 class QuotaMessageFilter : public WorkerThreadMessageFilter { |
| 16 public: | 17 public: |
| 17 explicit QuotaMessageFilter(ThreadSafeSender* thread_safe_sender); | 18 explicit QuotaMessageFilter(ThreadSafeSender* thread_safe_sender); |
| 18 | 19 |
| 19 // Generates a new request_id, registers { request_id, thread_id } map to | 20 // Generates a new request_id, registers { request_id, thread_id } map to |
| (...skipping 19 matching lines...) Expand all Loading... |
| 39 base::Lock request_id_map_lock_; | 40 base::Lock request_id_map_lock_; |
| 40 RequestIdToThreadId request_id_map_; | 41 RequestIdToThreadId request_id_map_; |
| 41 int next_request_id_; | 42 int next_request_id_; |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(QuotaMessageFilter); | 44 DISALLOW_COPY_AND_ASSIGN(QuotaMessageFilter); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace content | 47 } // namespace content |
| 47 | 48 |
| 48 #endif // CONTENT_CHILD_QUOTA_MESSAGE_FILTER_H_ | 49 #endif // CONTENT_CHILD_QUOTA_MESSAGE_FILTER_H_ |
| OLD | NEW |