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

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

Issue 9121053: Added net logging to DownloadItem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with parent. Created 8 years, 10 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
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698