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

Unified Diff: content/browser/download/download_net_log_parameters.h

Issue 9223019: Added net logging to BaseFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_net_log_parameters.h
diff --git a/content/browser/download/download_net_log_parameters.h b/content/browser/download/download_net_log_parameters.h
new file mode 100644
index 0000000000000000000000000000000000000000..031cea039242cc0cf2434a4d945cc96a490cc12d
--- /dev/null
+++ b/content/browser/download/download_net_log_parameters.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
+#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
+#pragma once
+
+#include <string>
+
+#include "net/base/net_errors.h"
+#include "net/base/net_log.h"
+
+namespace download_net_logs {
+
+// NetLog parameters when a DownloadFile is opened.
+class FileOpenedParameters : public net::NetLog::EventParameters {
+ public:
+ FileOpenedParameters(const std::string& file_name,
+ int64 start_offset);
+ virtual base::Value* ToValue() const OVERRIDE;
+
+ private:
+ const std::string file_name_;
+ const int64 start_offset_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileOpenedParameters);
+};
+
+// NetLog parameters when a DownloadFile is renamed.
+class FileRenamedParameters : public net::NetLog::EventParameters {
+ public:
+ FileRenamedParameters(
+ const std::string& old_filename, const std::string& new_filename);
+ virtual base::Value* ToValue() const OVERRIDE;
+
+ private:
+ const std::string old_filename_;
+ const std::string new_filename_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileRenamedParameters);
+};
+
+// NetLog parameters when a File has an error.
+class FileErrorParameters : public net::NetLog::EventParameters {
+ public:
+ FileErrorParameters(const std::string& operation, net::Error net_error);
+ virtual base::Value* ToValue() const OVERRIDE;
+
+ private:
+ const std::string operation_;
+ const net::Error net_error_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileErrorParameters);
+};
+
+} // namespace download_net_logs
+
+#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
« no previous file with comments | « content/browser/download/download_file_impl.cc ('k') | content/browser/download/download_net_log_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698