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

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

Issue 6005015: Revert 70618 - First pass at adding http/backend cache events to the NetLog. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « chrome/browser/net/connection_tester.cc ('k') | 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) 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 DNSJobTracker(); 297 DNSJobTracker();
298 298
299 protected: 299 protected:
300 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, 300 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
301 SourceInfo* out_info); 301 SourceInfo* out_info);
302 302
303 private: 303 private:
304 DISALLOW_COPY_AND_ASSIGN(DNSJobTracker); 304 DISALLOW_COPY_AND_ASSIGN(DNSJobTracker);
305 }; 305 };
306 306
307 // Tracks the log entries for the last seen SOURCE_DISK_CACHE_ENTRY.
308 class DiskCacheEntryTracker : public SourceTracker {
309 public:
310 static const size_t kMaxNumSources;
311 static const size_t kMaxGraveyardSize;
312
313 DiskCacheEntryTracker();
314
315 protected:
316 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
317 SourceInfo* out_info);
318
319 private:
320 DISALLOW_COPY_AND_ASSIGN(DiskCacheEntryTracker);
321 };
322
323 PassiveLogCollector(); 307 PassiveLogCollector();
324 ~PassiveLogCollector(); 308 ~PassiveLogCollector();
325 309
326 // ThreadSafeObserver implementation: 310 // ThreadSafeObserver implementation:
327 virtual void OnAddEntry(net::NetLog::EventType type, 311 virtual void OnAddEntry(net::NetLog::EventType type,
328 const base::TimeTicks& time, 312 const base::TimeTicks& time,
329 const net::NetLog::Source& source, 313 const net::NetLog::Source& source,
330 net::NetLog::EventPhase phase, 314 net::NetLog::EventPhase phase,
331 net::NetLog::EventParameters* params); 315 net::NetLog::EventParameters* params);
332 316
(...skipping 16 matching lines...) Expand all
349 333
350 GlobalSourceTracker global_source_tracker_; 334 GlobalSourceTracker global_source_tracker_;
351 ConnectJobTracker connect_job_tracker_; 335 ConnectJobTracker connect_job_tracker_;
352 SocketTracker socket_tracker_; 336 SocketTracker socket_tracker_;
353 RequestTracker url_request_tracker_; 337 RequestTracker url_request_tracker_;
354 RequestTracker socket_stream_tracker_; 338 RequestTracker socket_stream_tracker_;
355 InitProxyResolverTracker init_proxy_resolver_tracker_; 339 InitProxyResolverTracker init_proxy_resolver_tracker_;
356 SpdySessionTracker spdy_session_tracker_; 340 SpdySessionTracker spdy_session_tracker_;
357 DNSRequestTracker dns_request_tracker_; 341 DNSRequestTracker dns_request_tracker_;
358 DNSJobTracker dns_job_tracker_; 342 DNSJobTracker dns_job_tracker_;
359 DiskCacheEntryTracker disk_cache_entry_tracker_;
360 343
361 // This array maps each NetLog::SourceType to one of the tracker instances 344 // This array maps each NetLog::SourceType to one of the tracker instances
362 // defined above. Use of this array avoid duplicating the list of trackers 345 // defined above. Use of this array avoid duplicating the list of trackers
363 // elsewhere. 346 // elsewhere.
364 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; 347 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT];
365 348
366 // The count of how many events have flowed through this log. Used to set the 349 // The count of how many events have flowed through this log. Used to set the
367 // "order" field on captured events. 350 // "order" field on captured events.
368 uint32 num_events_seen_; 351 uint32 num_events_seen_;
369 352
370 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); 353 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector);
371 }; 354 };
372 355
373 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ 356 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/connection_tester.cc ('k') | chrome/browser/net/passive_log_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698