OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ | 5 #ifndef CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ |
6 #define CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ | 6 #define CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // to perform for this map entry on completion. | 174 // to perform for this map entry on completion. |
175 virtual Action DoAddEntry(const Entry& entry, SourceInfo* out_info) = 0; | 175 virtual Action DoAddEntry(const Entry& entry, SourceInfo* out_info) = 0; |
176 | 176 |
177 // Removes |source_id| from |sources_|. This also releases any references | 177 // Removes |source_id| from |sources_|. This also releases any references |
178 // to dependencies held by this source. | 178 // to dependencies held by this source. |
179 void DeleteSourceInfo(uint32 source_id); | 179 void DeleteSourceInfo(uint32 source_id); |
180 | 180 |
181 // Adds |source_id| to the FIFO queue (graveyard) for deletion. | 181 // Adds |source_id| to the FIFO queue (graveyard) for deletion. |
182 void AddToDeletionQueue(uint32 source_id); | 182 void AddToDeletionQueue(uint32 source_id); |
183 | 183 |
| 184 // Removes |source_id| from the |deletion_queue_| container. |
| 185 void EraseFromDeletionQueue(uint32 source_id); |
| 186 |
184 // Adds/Releases a reference from the source with ID |source_id|. | 187 // Adds/Releases a reference from the source with ID |source_id|. |
185 // Use |offset=-1| to do a release, and |offset=1| for an addref. | 188 // Use |offset=-1| to do a release, and |offset=1| for an addref. |
186 void AdjustReferenceCountForSource(int offset, uint32 source_id); | 189 void AdjustReferenceCountForSource(int offset, uint32 source_id); |
187 | 190 |
188 // Releases all the references to sources held by |info|. | 191 // Releases all the references to sources held by |info|. |
189 void ReleaseAllReferencesToDependencies(SourceInfo* info); | 192 void ReleaseAllReferencesToDependencies(SourceInfo* info); |
190 | 193 |
191 // This map contains all of the sources being tracked by this tracker. | 194 // This map contains all of the sources being tracked by this tracker. |
192 // (It includes both the "live" sources, and the "dead" ones.) | 195 // (It includes both the "live" sources, and the "dead" ones.) |
193 SourceIDToInfoMap sources_; | 196 SourceIDToInfoMap sources_; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; | 356 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; |
354 | 357 |
355 // The count of how many events have flowed through this log. Used to set the | 358 // The count of how many events have flowed through this log. Used to set the |
356 // "order" field on captured events. | 359 // "order" field on captured events. |
357 uint32 num_events_seen_; | 360 uint32 num_events_seen_; |
358 | 361 |
359 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); | 362 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); |
360 }; | 363 }; |
361 | 364 |
362 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ | 365 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ |
OLD | NEW |