diff options
author | ahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-05 06:46:26 +0000 |
---|---|---|
committer | ahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-05 06:46:26 +0000 |
commit | ac5e81005177ac0118b6f289f91e7919a642bc29 (patch) | |
tree | 3a08199af7aff8be0c27eaef04ae52c29a88024c /net | |
parent | ef5672efb64bbfa3e942a43ef9784f580313b062 (diff) | |
download | chromium_src-ac5e81005177ac0118b6f289f91e7919a642bc29.zip chromium_src-ac5e81005177ac0118b6f289f91e7919a642bc29.tar.gz chromium_src-ac5e81005177ac0118b6f289f91e7919a642bc29.tar.bz2 |
Added net logging to BaseFile.
This enables net logging for BaseFile if any customer of BaseFile choose to take advantage of it -- none yet do.
This is the second of 4 CLs that will enable net logging for downloads.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/9223019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/net_log_event_type_list.h | 49 | ||||
-rw-r--r-- | net/base/net_log_source_type_list.h | 5 |
2 files changed, 49 insertions, 5 deletions
diff --git a/net/base/net_log_event_type_list.h b/net/base/net_log_event_type_list.h index a53635f..0bba60f 100644 --- a/net/base/net_log_event_type_list.h +++ b/net/base/net_log_event_type_list.h @@ -1451,6 +1451,49 @@ EVENT_TYPE(HTTP_PIPELINED_CONNECTION_RECEIVED_HEADERS) EVENT_TYPE(HTTP_PIPELINED_CONNECTION_STREAM_CLOSED) // ------------------------------------------------------------------------ +// DownloadFile events. +// ------------------------------------------------------------------------ + +// This event is created when a download file is opened, and lasts until +// the file is closed. +// The BEGIN event has the following parameters: +// { +// "file_name": <The name of the file>, +// "start_offset": <The position at which to start writing>, +// } +EVENT_TYPE(DOWNLOAD_FILE_OPENED) + +// This event is created when a download file is written to. +// { +// "byte_count": <Number of bytes written in this call>, +// } +EVENT_TYPE(DOWNLOAD_FILE_WRITTEN) + +// This event is created when a download file is renamed. +// { +// "old_filename": <Old filename>, +// "new_filename": <New filename>, +// } +EVENT_TYPE(DOWNLOAD_FILE_RENAMED) + +// This event is created when a download file is closed. This event is allowed +// to occur even if the file is not open. +EVENT_TYPE(DOWNLOAD_FILE_CLOSED) + +// This event is created when a download file is detached. +EVENT_TYPE(DOWNLOAD_FILE_DETACHED) + +// This event is created when a download file is deleted. +EVENT_TYPE(DOWNLOAD_FILE_DELETED) + +// This event is created when a download file operation has an error. +// { +// "operation": <open, write, close, etc>, +// "net_error": <net::Error code>, +// } +EVENT_TYPE(DOWNLOAD_FILE_ERROR) + +// ------------------------------------------------------------------------ // FileStream events. // ------------------------------------------------------------------------ @@ -1484,8 +1527,8 @@ EVENT_TYPE(FILE_STREAM_CLOSE) // This event is created when a file stream operation has an error. // { -// "operation": open, write, close, etc. -// "os_error": OS-dependent error code. -// "net_error": net::Error code. +// "operation": <open, write, close, etc>, +// "os_error": <OS-dependent error code>, +// "net_error": <net::Error code>, // } EVENT_TYPE(FILE_STREAM_ERROR) diff --git a/net/base/net_log_source_type_list.h b/net/base/net_log_source_type_list.h index e879485..233f3a2 100644 --- a/net/base/net_log_source_type_list.h +++ b/net/base/net_log_source_type_list.h @@ -26,7 +26,8 @@ SOURCE_TYPE(ASYNC_HOST_RESOLVER_REQUEST, 15) SOURCE_TYPE(UDP_SOCKET, 16) SOURCE_TYPE(CERT_VERIFIER_JOB, 17) SOURCE_TYPE(HTTP_PIPELINED_CONNECTION, 18) -SOURCE_TYPE(FILESTREAM, 19) +SOURCE_TYPE(DOWNLOAD, 19) +SOURCE_TYPE(FILESTREAM, 20) -SOURCE_TYPE(COUNT, 20) // Always keep this as the last entry. +SOURCE_TYPE(COUNT, 21) // Always keep this as the last entry. |