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

Side by Side Diff: content/browser/download/download_net_log_parameters.h

Issue 11571025: Initial CL for Downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Pawel's comment. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/public/browser/download_item.h" 10 #include "content/public/browser/download_item.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/base/net_log.h" 12 #include "net/base/net_log.h"
13 13
14 class FilePath; 14 class FilePath;
15 class GURL; 15 class GURL;
16 16
17 namespace content { 17 namespace content {
18 18
19 enum DownloadType { 19 enum DownloadType {
20 SRC_NEW_DOWNLOAD, 20 SRC_ACTIVE_DOWNLOAD,
21 SRC_HISTORY_IMPORT, 21 SRC_HISTORY_IMPORT,
22 SRC_SAVE_PAGE_AS 22 SRC_SAVE_PAGE_AS
23 }; 23 };
24 24
25 // Returns NetLog parameters when a DownloadItem is activated. 25 // Returns NetLog parameters when a DownloadItem is activated.
26 base::Value* ItemActivatedNetLogCallback( 26 base::Value* ItemActivatedNetLogCallback(
27 const DownloadItem* download_item, 27 const DownloadItem* download_item,
28 DownloadType download_type, 28 DownloadType download_type,
29 const std::string* file_name, 29 const std::string* file_name,
30 net::NetLog::LogLevel log_level); 30 net::NetLog::LogLevel log_level);
31 31
32 // Returns NetLog parameters when a DownloadItem is checked for danger. 32 // Returns NetLog parameters when a DownloadItem is checked for danger.
33 base::Value* ItemCheckedNetLogCallback( 33 base::Value* ItemCheckedNetLogCallback(
34 DownloadDangerType danger_type, 34 DownloadDangerType danger_type,
35 DownloadItem::SafetyState safety_state, 35 DownloadItem::SafetyState safety_state,
36 net::NetLog::LogLevel log_level); 36 net::NetLog::LogLevel log_level);
37 37
38 // Returns NetLog parameters when a DownloadItem is renamed. 38 // Returns NetLog parameters when a DownloadItem is renamed.
39 base::Value* ItemRenamedNetLogCallback(const FilePath* old_filename, 39 base::Value* ItemRenamedNetLogCallback(const FilePath* old_filename,
40 const FilePath* new_filename, 40 const FilePath* new_filename,
41 net::NetLog::LogLevel log_level); 41 net::NetLog::LogLevel log_level);
42 42
43 // Returns NetLog parameters when a DownloadItem is interrupted. 43 // Returns NetLog parameters when a DownloadItem is interrupted.
44 base::Value* ItemInterruptedNetLogCallback(DownloadInterruptReason reason, 44 base::Value* ItemInterruptedNetLogCallback(DownloadInterruptReason reason,
45 int64 bytes_so_far, 45 int64 bytes_so_far,
46 const std::string* hash_state, 46 const std::string* hash_state,
47 net::NetLog::LogLevel log_level); 47 net::NetLog::LogLevel log_level);
48 48
49 // Returns NetLog parameters when a DownloadItem is resumed.
50 base::Value* ItemResumingNetLogCallback(bool user_initiated,
51 DownloadInterruptReason reason,
52 int64 bytes_so_far,
53 const std::string* hash_state,
54 net::NetLog::LogLevel log_level);
55
49 // Returns NetLog parameters when a DownloadItem is completing. 56 // Returns NetLog parameters when a DownloadItem is completing.
50 base::Value* ItemCompletingNetLogCallback(int64 bytes_so_far, 57 base::Value* ItemCompletingNetLogCallback(int64 bytes_so_far,
51 const std::string* final_hash, 58 const std::string* final_hash,
52 net::NetLog::LogLevel log_level); 59 net::NetLog::LogLevel log_level);
53 60
54 // Returns NetLog parameters when a DownloadItem is finished. 61 // Returns NetLog parameters when a DownloadItem is finished.
55 base::Value* ItemFinishedNetLogCallback(bool auto_opened, 62 base::Value* ItemFinishedNetLogCallback(bool auto_opened,
56 net::NetLog::LogLevel log_level); 63 net::NetLog::LogLevel log_level);
57 64
58 // Returns NetLog parameters when a DownloadItem is canceled. 65 // Returns NetLog parameters when a DownloadItem is canceled.
(...skipping 23 matching lines...) Expand all
82 89
83 // Returns NetLog parameters for a download interruption. 90 // Returns NetLog parameters for a download interruption.
84 base::Value* FileInterruptedNetLogCallback(const char* operation, 91 base::Value* FileInterruptedNetLogCallback(const char* operation,
85 int os_error, 92 int os_error,
86 DownloadInterruptReason reason, 93 DownloadInterruptReason reason,
87 net::NetLog::LogLevel log_level); 94 net::NetLog::LogLevel log_level);
88 95
89 } // namespace content 96 } // namespace content
90 97
91 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_ 98 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.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