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

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

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Lint fixes 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
307 PassiveLogCollector(); 323 PassiveLogCollector();
308 ~PassiveLogCollector(); 324 ~PassiveLogCollector();
309 325
310 // ThreadSafeObserver implementation: 326 // ThreadSafeObserver implementation:
311 virtual void OnAddEntry(net::NetLog::EventType type, 327 virtual void OnAddEntry(net::NetLog::EventType type,
312 const base::TimeTicks& time, 328 const base::TimeTicks& time,
313 const net::NetLog::Source& source, 329 const net::NetLog::Source& source,
314 net::NetLog::EventPhase phase, 330 net::NetLog::EventPhase phase,
315 net::NetLog::EventParameters* params); 331 net::NetLog::EventParameters* params);
316 332
(...skipping 16 matching lines...) Expand all
333 349
334 GlobalSourceTracker global_source_tracker_; 350 GlobalSourceTracker global_source_tracker_;
335 ConnectJobTracker connect_job_tracker_; 351 ConnectJobTracker connect_job_tracker_;
336 SocketTracker socket_tracker_; 352 SocketTracker socket_tracker_;
337 RequestTracker url_request_tracker_; 353 RequestTracker url_request_tracker_;
338 RequestTracker socket_stream_tracker_; 354 RequestTracker socket_stream_tracker_;
339 InitProxyResolverTracker init_proxy_resolver_tracker_; 355 InitProxyResolverTracker init_proxy_resolver_tracker_;
340 SpdySessionTracker spdy_session_tracker_; 356 SpdySessionTracker spdy_session_tracker_;
341 DNSRequestTracker dns_request_tracker_; 357 DNSRequestTracker dns_request_tracker_;
342 DNSJobTracker dns_job_tracker_; 358 DNSJobTracker dns_job_tracker_;
359 DiskCacheEntryTracker disk_cache_entry_tracker_;
343 360
344 // This array maps each NetLog::SourceType to one of the tracker instances 361 // This array maps each NetLog::SourceType to one of the tracker instances
345 // defined above. Use of this array avoid duplicating the list of trackers 362 // defined above. Use of this array avoid duplicating the list of trackers
346 // elsewhere. 363 // elsewhere.
347 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; 364 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT];
348 365
349 // The count of how many events have flowed through this log. Used to set the 366 // The count of how many events have flowed through this log. Used to set the
350 // "order" field on captured events. 367 // "order" field on captured events.
351 uint32 num_events_seen_; 368 uint32 num_events_seen_;
352 369
353 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); 370 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector);
354 }; 371 };
355 372
356 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ 373 #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