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

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

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed Created 5 years, 7 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
index de0c9578a5b65701acbcb81f91aff0cb150557fa..6e103bdff5f0991b1eabc53ac553794e1a58df47 100644
--- a/content/browser/download/download_net_log_parameters.h
+++ b/content/browser/download/download_net_log_parameters.h
@@ -26,73 +26,85 @@ enum DownloadType {
};
// Returns NetLog parameters when a DownloadItem is activated.
-base::Value* ItemActivatedNetLogCallback(const DownloadItem* download_item,
- DownloadType download_type,
- const std::string* file_name,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemActivatedNetLogCallback(
+ const DownloadItem* download_item,
+ DownloadType download_type,
+ const std::string* file_name,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is checked for danger.
-base::Value* ItemCheckedNetLogCallback(DownloadDangerType danger_type,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemCheckedNetLogCallback(
+ DownloadDangerType danger_type,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is renamed.
-base::Value* ItemRenamedNetLogCallback(const base::FilePath* old_filename,
- const base::FilePath* new_filename,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemRenamedNetLogCallback(
+ const base::FilePath* old_filename,
+ const base::FilePath* new_filename,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is interrupted.
-base::Value* ItemInterruptedNetLogCallback(DownloadInterruptReason reason,
- int64 bytes_so_far,
- const std::string* hash_state,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
+ DownloadInterruptReason reason,
+ int64 bytes_so_far,
+ const std::string* hash_state,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is resumed.
-base::Value* ItemResumingNetLogCallback(bool user_initiated,
- DownloadInterruptReason reason,
- int64 bytes_so_far,
- const std::string* hash_state,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemResumingNetLogCallback(
+ bool user_initiated,
+ DownloadInterruptReason reason,
+ int64 bytes_so_far,
+ const std::string* hash_state,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is completing.
-base::Value* ItemCompletingNetLogCallback(int64 bytes_so_far,
- const std::string* final_hash,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemCompletingNetLogCallback(
+ int64 bytes_so_far,
+ const std::string* final_hash,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is finished.
-base::Value* ItemFinishedNetLogCallback(bool auto_opened,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemFinishedNetLogCallback(
+ bool auto_opened,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is canceled.
-base::Value* ItemCanceledNetLogCallback(int64 bytes_so_far,
- const std::string* hash_state,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> ItemCanceledNetLogCallback(
+ int64 bytes_so_far,
+ const std::string* hash_state,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadFile is opened.
-base::Value* FileOpenedNetLogCallback(const base::FilePath* file_name,
- int64 start_offset,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> FileOpenedNetLogCallback(
+ const base::FilePath* file_name,
+ int64 start_offset,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadFile is opened.
-base::Value* FileStreamDrainedNetLogCallback(
+scoped_ptr<base::Value> FileStreamDrainedNetLogCallback(
size_t stream_size,
size_t num_buffers,
net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadFile is renamed.
-base::Value* FileRenamedNetLogCallback(const base::FilePath* old_filename,
- const base::FilePath* new_filename,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> FileRenamedNetLogCallback(
+ const base::FilePath* old_filename,
+ const base::FilePath* new_filename,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a File has an error.
-base::Value* FileErrorNetLogCallback(const char* operation,
- net::Error net_error,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> FileErrorNetLogCallback(
+ const char* operation,
+ net::Error net_error,
+ net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters for a download interruption.
-base::Value* FileInterruptedNetLogCallback(const char* operation,
- int os_error,
- DownloadInterruptReason reason,
- net::NetLogCaptureMode capture_mode);
+scoped_ptr<base::Value> FileInterruptedNetLogCallback(
+ const char* operation,
+ int os_error,
+ DownloadInterruptReason reason,
+ net::NetLogCaptureMode capture_mode);
} // namespace content
« 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