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

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

Issue 11238044: Refactor BaseFile methods to return a DownloadInterruptReason instead of a net::Error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SHFILE_TO_REASON macro Created 8 years, 2 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
« no previous file with comments | « content/browser/download/download_net_log_parameters.h ('k') | content/browser/download/save_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_net_log_parameters.cc
diff --git a/content/browser/download/download_net_log_parameters.cc b/content/browser/download/download_net_log_parameters.cc
index 00a9d5dee77393c8b9ea9ad0bdbe5a5da2330a8f..c0d42cfbe6960710b5ee00d10d11a0e16607fb4a 100644
--- a/content/browser/download/download_net_log_parameters.cc
+++ b/content/browser/download/download_net_log_parameters.cc
@@ -183,4 +183,19 @@ base::Value* FileErrorCallback(const char* operation,
return dict;
}
+base::Value* FileInterruptedCallback(const char* operation,
+ int os_error,
+ content::DownloadInterruptReason reason,
+ net::NetLog::LogLevel /* log_level */) {
+ DictionaryValue* dict = new DictionaryValue();
+
+ dict->SetString("operation", operation);
+ if (os_error != 0)
+ dict->SetInteger("os_error", os_error);
+ dict->SetString("interrupt_reason", InterruptReasonDebugString(reason));
+
+ return dict;
+}
+
+
} // namespace download_net_logs
« no previous file with comments | « content/browser/download/download_net_log_parameters.h ('k') | content/browser/download/save_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698