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

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

Issue 6613027: Adds memory cache logging, and updates disk cache logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Oops Created 9 years, 9 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) 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 DiskCacheEntryTracker(); 306 DiskCacheEntryTracker();
307 307
308 private: 308 private:
309 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, 309 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
310 SourceInfo* out_info); 310 SourceInfo* out_info);
311 311
312 DISALLOW_COPY_AND_ASSIGN(DiskCacheEntryTracker); 312 DISALLOW_COPY_AND_ASSIGN(DiskCacheEntryTracker);
313 }; 313 };
314 314
315 // Tracks the log entries for the last seen SOURCE_DISK_CACHE_ENTRY.
316 class MemCacheEntryTracker : public SourceTracker {
317 public:
318 static const size_t kMaxNumSources;
319 static const size_t kMaxGraveyardSize;
320
321 MemCacheEntryTracker();
322
323 protected:
324 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
325 SourceInfo* out_info);
326
327 private:
328 DISALLOW_COPY_AND_ASSIGN(MemCacheEntryTracker);
329 };
330
315 class HttpStreamJobTracker : public SourceTracker { 331 class HttpStreamJobTracker : public SourceTracker {
316 public: 332 public:
317 static const size_t kMaxNumSources; 333 static const size_t kMaxNumSources;
318 static const size_t kMaxGraveyardSize; 334 static const size_t kMaxGraveyardSize;
319 335
320 explicit HttpStreamJobTracker(PassiveLogCollector* parent); 336 explicit HttpStreamJobTracker(PassiveLogCollector* parent);
321 337
322 private: 338 private:
323 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry, 339 virtual Action DoAddEntry(const ChromeNetLog::Entry& entry,
324 SourceInfo* out_info); 340 SourceInfo* out_info);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 GlobalSourceTracker global_source_tracker_; 372 GlobalSourceTracker global_source_tracker_;
357 ConnectJobTracker connect_job_tracker_; 373 ConnectJobTracker connect_job_tracker_;
358 SocketTracker socket_tracker_; 374 SocketTracker socket_tracker_;
359 RequestTracker url_request_tracker_; 375 RequestTracker url_request_tracker_;
360 RequestTracker socket_stream_tracker_; 376 RequestTracker socket_stream_tracker_;
361 InitProxyResolverTracker init_proxy_resolver_tracker_; 377 InitProxyResolverTracker init_proxy_resolver_tracker_;
362 SpdySessionTracker spdy_session_tracker_; 378 SpdySessionTracker spdy_session_tracker_;
363 DNSRequestTracker dns_request_tracker_; 379 DNSRequestTracker dns_request_tracker_;
364 DNSJobTracker dns_job_tracker_; 380 DNSJobTracker dns_job_tracker_;
365 DiskCacheEntryTracker disk_cache_entry_tracker_; 381 DiskCacheEntryTracker disk_cache_entry_tracker_;
382 MemCacheEntryTracker mem_cache_entry_tracker_;
366 HttpStreamJobTracker http_stream_job_tracker_; 383 HttpStreamJobTracker http_stream_job_tracker_;
367 384
368 // This array maps each NetLog::SourceType to one of the tracker instances 385 // This array maps each NetLog::SourceType to one of the tracker instances
369 // defined above. Use of this array avoid duplicating the list of trackers 386 // defined above. Use of this array avoid duplicating the list of trackers
370 // elsewhere. 387 // elsewhere.
371 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT]; 388 SourceTrackerInterface* trackers_[net::NetLog::SOURCE_COUNT];
372 389
373 // The count of how many events have flowed through this log. Used to set the 390 // The count of how many events have flowed through this log. Used to set the
374 // "order" field on captured events. 391 // "order" field on captured events.
375 uint32 num_events_seen_; 392 uint32 num_events_seen_;
376 393
377 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector); 394 DISALLOW_COPY_AND_ASSIGN(PassiveLogCollector);
378 }; 395 };
379 396
380 #endif // CHROME_BROWSER_NET_PASSIVE_LOG_COLLECTOR_H_ 397 #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