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

Side by Side Diff: chrome/browser/net/passive_log_collector.h

Issue 9288084: Added Net logging to FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up year on licence text. Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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>
11 #include <vector> 11 #include <vector>
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 HttpPipelinedConnectionTracker(); 424 HttpPipelinedConnectionTracker();
425 425
426 private: 426 private:
427 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, 427 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
428 SourceInfo* out_info) OVERRIDE; 428 SourceInfo* out_info) OVERRIDE;
429 429
430 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionTracker); 430 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionTracker);
431 }; 431 };
432 432
433 // Tracks the log entries for the last seen SOURCE_FILESTREAM.
434 class FileStreamTracker : public SourceTracker {
435 public:
436 static const size_t kMaxNumSources;
437 static const size_t kMaxGraveyardSize;
438
439 FileStreamTracker();
440
441 private:
442 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
443 SourceInfo* out_info) OVERRIDE;
444
445 DISALLOW_COPY_AND_ASSIGN(FileStreamTracker);
446 };
447
433 PassiveLogCollector(); 448 PassiveLogCollector();
434 virtual ~PassiveLogCollector(); 449 virtual ~PassiveLogCollector();
435 450
436 // ThreadSafeObserver implementation: 451 // ThreadSafeObserver implementation:
437 virtual void OnAddEntry(net::NetLog::EventType type, 452 virtual void OnAddEntry(net::NetLog::EventType type,
438 const base::TimeTicks& time, 453 const base::TimeTicks& time,
439 const net::NetLog::Source& source, 454 const net::NetLog::Source& source,
440 net::NetLog::EventPhase phase, 455 net::NetLog::EventPhase phase,
441 net::NetLog::EventParameters* params) OVERRIDE; 456 net::NetLog::EventParameters* params) OVERRIDE;
442 457
(...skipping 25 matching lines...) Expand all
468 DNSJobTracker dns_job_tracker_; 483 DNSJobTracker dns_job_tracker_;
469 DiskCacheEntryTracker disk_cache_entry_tracker_; 484 DiskCacheEntryTracker disk_cache_entry_tracker_;
470 MemCacheEntryTracker mem_cache_entry_tracker_; 485 MemCacheEntryTracker mem_cache_entry_tracker_;
471 HttpStreamJobTracker http_stream_job_tracker_; 486 HttpStreamJobTracker http_stream_job_tracker_;
472 ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_; 487 ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_;
473 DnsTransactionTracker dns_transaction_tracker_; 488 DnsTransactionTracker dns_transaction_tracker_;
474 AsyncHostResolverRequestTracker async_host_resolver_request_tracker_; 489 AsyncHostResolverRequestTracker async_host_resolver_request_tracker_;
475 UDPSocketTracker udp_socket_tracker_; 490 UDPSocketTracker udp_socket_tracker_;
476 CertVerifierJobTracker cert_verifier_job_tracker_; 491 CertVerifierJobTracker cert_verifier_job_tracker_;
477 HttpPipelinedConnectionTracker http_pipelined_connection_tracker_; 492 HttpPipelinedConnectionTracker http_pipelined_connection_tracker_;
493 FileStreamTracker file_stream_tracker_;
478 494
479 // This array maps each NetLog::SourceType to one of the tracker instances 495 // This array maps each NetLog::SourceType to one of the tracker instances
480 // defined above. Use of this array avoid duplicating the list of trackers 496 // defined above. Use of this array avoid duplicating the list of trackers
481 // elsewhere. 497 // elsewhere.
482 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; 498 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT];
483 499
484 // The count of how many events have flowed through this log. Used to set the 500 // The count of how many events have flowed through this log. Used to set the
485 // "order" field on captured events. 501 // "order" field on captured events.
486 uint32 num_events_seen_; 502 uint32 num_events_seen_;
487 503
488 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); 504 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector);
489 }; 505 };
490 506
491 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ 507 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698