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 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 439 |
440 HttpPipelinedConnectionTracker(); | 440 HttpPipelinedConnectionTracker(); |
441 | 441 |
442 private: | 442 private: |
443 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, | 443 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, |
444 SourceInfo* out_info) OVERRIDE; | 444 SourceInfo* out_info) OVERRIDE; |
445 | 445 |
446 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionTracker); | 446 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionTracker); |
447 }; | 447 }; |
448 | 448 |
| 449 // Tracks the log entries for the last seen SOURCE_FILESTREAM. |
| 450 class FileStreamTracker : public SourceTracker { |
| 451 public: |
| 452 static const size_t kMaxNumSources; |
| 453 static const size_t kMaxGraveyardSize; |
| 454 |
| 455 FileStreamTracker(); |
| 456 |
| 457 private: |
| 458 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, |
| 459 SourceInfo* out_info) OVERRIDE; |
| 460 |
| 461 DISALLOW_COPY_AND_ASSIGN(FileStreamTracker); |
| 462 }; |
| 463 |
449 PassiveLogCollector(); | 464 PassiveLogCollector(); |
450 virtual ~PassiveLogCollector(); | 465 virtual ~PassiveLogCollector(); |
451 | 466 |
452 // ThreadSafeObserver implementation: | 467 // ThreadSafeObserver implementation: |
453 virtual void OnAddEntry(net::NetLog::EventType type, | 468 virtual void OnAddEntry(net::NetLog::EventType type, |
454 const base::TimeTicks& time, | 469 const base::TimeTicks& time, |
455 const net::NetLog::Source& source, | 470 const net::NetLog::Source& source, |
456 net::NetLog::EventPhase phase, | 471 net::NetLog::EventPhase phase, |
457 net::NetLog::EventParameters* params) OVERRIDE; | 472 net::NetLog::EventParameters* params) OVERRIDE; |
458 | 473 |
(...skipping 26 matching lines...) Expand all Loading... |
485 HostResolverProcTaskTracker dns_proc_task_tracker_; | 500 HostResolverProcTaskTracker dns_proc_task_tracker_; |
486 DiskCacheEntryTracker disk_cache_entry_tracker_; | 501 DiskCacheEntryTracker disk_cache_entry_tracker_; |
487 MemCacheEntryTracker mem_cache_entry_tracker_; | 502 MemCacheEntryTracker mem_cache_entry_tracker_; |
488 HttpStreamJobTracker http_stream_job_tracker_; | 503 HttpStreamJobTracker http_stream_job_tracker_; |
489 ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_; | 504 ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_; |
490 DnsTransactionTracker dns_transaction_tracker_; | 505 DnsTransactionTracker dns_transaction_tracker_; |
491 AsyncHostResolverRequestTracker async_host_resolver_request_tracker_; | 506 AsyncHostResolverRequestTracker async_host_resolver_request_tracker_; |
492 UDPSocketTracker udp_socket_tracker_; | 507 UDPSocketTracker udp_socket_tracker_; |
493 CertVerifierJobTracker cert_verifier_job_tracker_; | 508 CertVerifierJobTracker cert_verifier_job_tracker_; |
494 HttpPipelinedConnectionTracker http_pipelined_connection_tracker_; | 509 HttpPipelinedConnectionTracker http_pipelined_connection_tracker_; |
| 510 FileStreamTracker file_stream_tracker_; |
495 | 511 |
496 // This array maps each NetLog::SourceType to one of the tracker instances | 512 // This array maps each NetLog::SourceType to one of the tracker instances |
497 // defined above. Use of this array avoid duplicating the list of trackers | 513 // defined above. Use of this array avoid duplicating the list of trackers |
498 // elsewhere. | 514 // elsewhere. |
499 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; | 515 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; |
500 | 516 |
501 // The count of how many events have flowed through this log. Used to set the | 517 // The count of how many events have flowed through this log. Used to set the |
502 // "order" field on captured events. | 518 // "order" field on captured events. |
503 uint32 num_events_seen_; | 519 uint32 num_events_seen_; |
504 | 520 |
505 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); | 521 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); |
506 }; | 522 }; |
507 | 523 |
508 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ | 524 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ |
OLD | NEW |