Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_ | |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "net/base/net_errors.h" | |
| 12 #include "net/base/net_log.h" | |
| 13 | |
| 14 namespace download_net_logs { | |
| 15 | |
| 16 // NetLog parameters when a DownloadFile is opened. | |
| 17 class FileOpenedParameters : public net::NetLog::EventParameters { | |
| 18 public: | |
| 19 FileOpenedParameters(const std::string& file_name, | |
| 20 int64 start_offset); | |
| 21 virtual base::Value* ToValue() const OVERRIDE; | |
| 22 | |
| 23 private: | |
| 24 const std::string file_name_; | |
| 25 const int64 start_offset_; | |
| 26 | |
| 27 DISALLOW_COPY_AND_ASSIGN(FileOpenedParameters); | |
| 28 }; | |
| 29 | |
| 30 // NetLog parameters when a DownloadFile is written. | |
| 31 class FileWrittenParameters : public net::NetLog::EventParameters { | |
| 32 public: | |
| 33 FileWrittenParameters(int64 bytes_in_write, int64 bytes_so_far); | |
| 34 virtual base::Value* ToValue() const OVERRIDE; | |
| 35 | |
| 36 private: | |
| 37 const int64 bytes_in_write_; | |
| 38 const int64 bytes_so_far_; | |
|
Randy Smith (Not in Mondays)
2012/02/02 20:05:54
I think if we can count on not missing any instanc
ahendrickson
2012/02/02 22:23:36
Done.
| |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(FileWrittenParameters); | |
| 41 }; | |
| 42 | |
| 43 // NetLog parameters when a DownloadFile is renamed. | |
| 44 class FileRenamedParameters : public net::NetLog::EventParameters { | |
| 45 public: | |
| 46 FileRenamedParameters( | |
| 47 const std::string& old_filename, const std::string& new_filename); | |
| 48 virtual base::Value* ToValue() const OVERRIDE; | |
| 49 | |
| 50 private: | |
| 51 const std::string old_filename_; | |
| 52 const std::string new_filename_; | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(FileRenamedParameters); | |
| 55 }; | |
| 56 | |
| 57 // NetLog parameters when a File has an error. | |
| 58 class FileErrorParameters : public net::NetLog::EventParameters { | |
| 59 public: | |
| 60 FileErrorParameters(const std::string& operation, net::Error net_error); | |
| 61 virtual base::Value* ToValue() const OVERRIDE; | |
| 62 | |
| 63 private: | |
| 64 std::string operation_; | |
| 65 net::Error net_error_; | |
|
mmenke1
2012/02/03 18:32:32
nit: These can be const
ahendrickson
2012/02/04 05:27:14
Done.
| |
| 66 | |
| 67 DISALLOW_COPY_AND_ASSIGN(FileErrorParameters); | |
| 68 }; | |
| 69 | |
| 70 } // namespace download_net_logs | |
| 71 | |
| 72 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_ | |
| OLD | NEW |