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

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 renamed.
31 class FileRenamedParameters : public net::NetLog::EventParameters {
32 public:
33 FileRenamedParameters(
34 const std::string& old_filename, const std::string& new_filename);
35 virtual base::Value* ToValue() const OVERRIDE;
36
37 private:
38 const std::string old_filename_;
39 const std::string new_filename_;
40
41 DISALLOW_COPY_AND_ASSIGN(FileRenamedParameters);
42 };
43
44 // NetLog parameters when a File has an error.
45 class FileErrorParameters : public net::NetLog::EventParameters {
46 public:
47 FileErrorParameters(const std::string& operation, net::Error net_error);
48 virtual base::Value* ToValue() const OVERRIDE;
49
50 private:
51 const std::string operation_;
52 const net::Error net_error_;
53
54 DISALLOW_COPY_AND_ASSIGN(FileErrorParameters);
55 };
56
57 } // namespace download_net_logs
58
59 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698