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

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

Issue 8200011: Add NetLog support to UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: ??? Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/net/passive_log_collector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 AsyncHostResolverRequestTracker(); 378 AsyncHostResolverRequestTracker();
379 379
380 private: 380 private:
381 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, 381 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
382 SourceInfo* out_info); 382 SourceInfo* out_info);
383 383
384 DISALLOW_COPY_AND_ASSIGN(AsyncHostResolverRequestTracker); 384 DISALLOW_COPY_AND_ASSIGN(AsyncHostResolverRequestTracker);
385 }; 385 };
386 386
387
388 // Tracks the log entries for the last seen SOURCE_UDP_SOCKET.
389 class UDPSocketTracker : public SourceTracker {
390 public:
391 static const size_t kMaxNumSources;
392 static const size_t kMaxGraveyardSize;
393
394 UDPSocketTracker();
395
396 private:
397 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
398 SourceInfo* out_info);
399
400 DISALLOW_COPY_AND_ASSIGN(UDPSocketTracker);
401 };
402
387 PassiveLogCollector(); 403 PassiveLogCollector();
388 virtual ~PassiveLogCollector(); 404 virtual ~PassiveLogCollector();
389 405
390 // ThreadSafeObserver implementation: 406 // ThreadSafeObserver implementation:
391 virtual void OnAddEntry(net::NetLog::EventType type, 407 virtual void OnAddEntry(net::NetLog::EventType type,
392 const base::TimeTicks& time, 408 const base::TimeTicks& time,
393 const net::NetLog::Source& source, 409 const net::NetLog::Source& source,
394 net::NetLog::EventPhase phase, 410 net::NetLog::EventPhase phase,
395 net::NetLog::EventParameters* params); 411 net::NetLog::EventParameters* params);
396 412
(...skipping 22 matching lines...) Expand all
419 InitProxyResolverTracker init_proxy_resolver_tracker_; 435 InitProxyResolverTracker init_proxy_resolver_tracker_;
420 SpdySessionTracker spdy_session_tracker_; 436 SpdySessionTracker spdy_session_tracker_;
421 DNSRequestTracker dns_request_tracker_; 437 DNSRequestTracker dns_request_tracker_;
422 DNSJobTracker dns_job_tracker_; 438 DNSJobTracker dns_job_tracker_;
423 DiskCacheEntryTracker disk_cache_entry_tracker_; 439 DiskCacheEntryTracker disk_cache_entry_tracker_;
424 MemCacheEntryTracker mem_cache_entry_tracker_; 440 MemCacheEntryTracker mem_cache_entry_tracker_;
425 HttpStreamJobTracker http_stream_job_tracker_; 441 HttpStreamJobTracker http_stream_job_tracker_;
426 ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_; 442 ExponentialBackoffThrottlingTracker exponential_backoff_throttling_tracker_;
427 DnsTransactionTracker dns_transaction_tracker_; 443 DnsTransactionTracker dns_transaction_tracker_;
428 AsyncHostResolverRequestTracker async_host_resolver_request_tracker_; 444 AsyncHostResolverRequestTracker async_host_resolver_request_tracker_;
445 UDPSocketTracker udp_socket_tracker_;
429 446
430 // This array maps each NetLog::SourceType to one of the tracker instances 447 // This array maps each NetLog::SourceType to one of the tracker instances
431 // defined above. Use of this array avoid duplicating the list of trackers 448 // defined above. Use of this array avoid duplicating the list of trackers
432 // elsewhere. 449 // elsewhere.
433 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; 450 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT];
434 451
435 // The count of how many events have flowed through this log. Used to set the 452 // The count of how many events have flowed through this log. Used to set the
436 // "order" field on captured events. 453 // "order" field on captured events.
437 uint32 num_events_seen_; 454 uint32 num_events_seen_;
438 455
439 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); 456 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector);
440 }; 457 };
441 458
442 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ 459 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/passive_log_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698