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

Side by Side 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: Minor cleanup 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698