OLD | NEW |
---|---|
1 // Copyright (c) 2012 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 #include "chrome/browser/net/passive_log_collector.h" | 5 #include "chrome/browser/net/passive_log_collector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
862 PassiveLogCollector:: | 862 PassiveLogCollector:: |
863 DowloadTracker::DowloadTracker() | 863 DowloadTracker::DowloadTracker() |
864 : SourceTracker(kMaxNumSources, kMaxGraveyardSize, NULL) { | 864 : SourceTracker(kMaxNumSources, kMaxGraveyardSize, NULL) { |
865 } | 865 } |
866 | 866 |
867 PassiveLogCollector::SourceTracker::Action | 867 PassiveLogCollector::SourceTracker::Action |
868 PassiveLogCollector::DowloadTracker::DoAddEntry( | 868 PassiveLogCollector::DowloadTracker::DoAddEntry( |
869 const ChromeNetLog::Entry& entry, | 869 const ChromeNetLog::Entry& entry, |
870 SourceInfo* out_info) { | 870 SourceInfo* out_info) { |
871 AddEntryToSourceInfo(entry, out_info); | 871 AddEntryToSourceInfo(entry, out_info); |
872 if (entry.type == net::NetLog::TYPE_DOWNLOAD_FILE_OPENED && | 872 if (entry.type == net::NetLog::TYPE_DOWNLOAD_ITEM_ACTIVE && |
Randy Smith (Not in Mondays)
2012/02/03 18:23:37
Sorry, my lack of knowledge of netlog, but what is
mmenke
2012/02/03 18:27:54
Two purposes: To avoid keeping spammy events arou
| |
873 entry.phase == net::NetLog::PHASE_END) { | 873 entry.phase == net::NetLog::PHASE_END) { |
874 return ACTION_MOVE_TO_GRAVEYARD; | 874 return ACTION_MOVE_TO_GRAVEYARD; |
875 } | 875 } |
876 return ACTION_NONE; | 876 return ACTION_NONE; |
877 } | 877 } |
878 | 878 |
879 //---------------------------------------------------------------------------- | 879 //---------------------------------------------------------------------------- |
880 // FileStreamTracker | 880 // FileStreamTracker |
881 //---------------------------------------------------------------------------- | 881 //---------------------------------------------------------------------------- |
882 | 882 |
(...skipping 12 matching lines...) Expand all Loading... | |
895 PassiveLogCollector::FileStreamTracker::DoAddEntry( | 895 PassiveLogCollector::FileStreamTracker::DoAddEntry( |
896 const ChromeNetLog::Entry& entry, | 896 const ChromeNetLog::Entry& entry, |
897 SourceInfo* out_info) { | 897 SourceInfo* out_info) { |
898 AddEntryToSourceInfo(entry, out_info); | 898 AddEntryToSourceInfo(entry, out_info); |
899 if (entry.type == net::NetLog::TYPE_FILE_STREAM_ALIVE && | 899 if (entry.type == net::NetLog::TYPE_FILE_STREAM_ALIVE && |
900 entry.phase == net::NetLog::PHASE_END) { | 900 entry.phase == net::NetLog::PHASE_END) { |
901 return ACTION_MOVE_TO_GRAVEYARD; | 901 return ACTION_MOVE_TO_GRAVEYARD; |
902 } | 902 } |
903 return ACTION_NONE; | 903 return ACTION_NONE; |
904 } | 904 } |
OLD | NEW |