OLD | NEW |
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 #include "content/browser/download/download_net_log_parameters.h" | 5 #include "content/browser/download/download_net_log_parameters.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 net::Error net_error, | 176 net::Error net_error, |
177 net::NetLog::LogLevel /* log_level */) { | 177 net::NetLog::LogLevel /* log_level */) { |
178 DictionaryValue* dict = new DictionaryValue(); | 178 DictionaryValue* dict = new DictionaryValue(); |
179 | 179 |
180 dict->SetString("operation", operation); | 180 dict->SetString("operation", operation); |
181 dict->SetInteger("net_error", net_error); | 181 dict->SetInteger("net_error", net_error); |
182 | 182 |
183 return dict; | 183 return dict; |
184 } | 184 } |
185 | 185 |
| 186 base::Value* FileInterruptedCallback(const char* operation, |
| 187 int os_error, |
| 188 content::DownloadInterruptReason reason, |
| 189 net::NetLog::LogLevel /* log_level */) { |
| 190 DictionaryValue* dict = new DictionaryValue(); |
| 191 |
| 192 dict->SetString("operation", operation); |
| 193 if (os_error != 0) |
| 194 dict->SetInteger("os_error", os_error); |
| 195 dict->SetString("interrupt_reason", InterruptReasonDebugString(reason)); |
| 196 |
| 197 return dict; |
| 198 } |
| 199 |
| 200 |
186 } // namespace download_net_logs | 201 } // namespace download_net_logs |
OLD | NEW |