| 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 #ifndef NET_BASE_CAPTURING_NET_LOG_H_ | 5 #ifndef NET_BASE_CAPTURING_NET_LOG_H_ |
| 6 #define NET_BASE_CAPTURING_NET_LOG_H_ | 6 #define NET_BASE_CAPTURING_NET_LOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void GetEntriesForSource(Source source, | 98 void GetEntriesForSource(Source source, |
| 99 CapturedEntryList* entry_list) const; | 99 CapturedEntryList* entry_list) const; |
| 100 | 100 |
| 101 // Returns number of entries in the log. | 101 // Returns number of entries in the log. |
| 102 size_t GetSize() const; | 102 size_t GetSize() const; |
| 103 | 103 |
| 104 void Clear(); | 104 void Clear(); |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 // ThreadSafeObserver implementation: | 107 // ThreadSafeObserver implementation: |
| 108 virtual void OnAddEntry(const Entry& entry) OVERRIDE; | 108 virtual void OnAddEntry(const Entry& entry) override; |
| 109 | 109 |
| 110 // Needs to be "mutable" so can use it in GetEntries(). | 110 // Needs to be "mutable" so can use it in GetEntries(). |
| 111 mutable base::Lock lock_; | 111 mutable base::Lock lock_; |
| 112 | 112 |
| 113 CapturedEntryList captured_entries_; | 113 CapturedEntryList captured_entries_; |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(Observer); | 115 DISALLOW_COPY_AND_ASSIGN(Observer); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 Observer capturing_net_log_observer_; | 118 Observer capturing_net_log_observer_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 private: | 152 private: |
| 153 CapturingNetLog capturing_net_log_; | 153 CapturingNetLog capturing_net_log_; |
| 154 const BoundNetLog net_log_; | 154 const BoundNetLog net_log_; |
| 155 | 155 |
| 156 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); | 156 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace net | 159 } // namespace net |
| 160 | 160 |
| 161 #endif // NET_BASE_CAPTURING_NET_LOG_H_ | 161 #endif // NET_BASE_CAPTURING_NET_LOG_H_ |
| OLD | NEW |