| 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/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 "DANGEROUS_FILE", | 27 "DANGEROUS_FILE", |
| 28 "DANGEROUS_URL", | 28 "DANGEROUS_URL", |
| 29 "DANGEROUS_CONTENT", | 29 "DANGEROUS_CONTENT", |
| 30 "MAYBE_DANGEROUS_CONTENT", | 30 "MAYBE_DANGEROUS_CONTENT", |
| 31 "UNCOMMON_CONTENT", | 31 "UNCOMMON_CONTENT", |
| 32 "USER_VALIDATED", | 32 "USER_VALIDATED", |
| 33 "DANGEROUS_HOST", | 33 "DANGEROUS_HOST", |
| 34 "POTENTIALLY_UNWANTED" | 34 "POTENTIALLY_UNWANTED" |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 COMPILE_ASSERT(arraysize(download_type_names) == SRC_SAVE_PAGE_AS + 1, | 37 static_assert(arraysize(download_type_names) == SRC_SAVE_PAGE_AS + 1, |
| 38 download_type_enum_has_changed); | 38 "download type enum has changed"); |
| 39 COMPILE_ASSERT(arraysize(download_danger_names) == DOWNLOAD_DANGER_TYPE_MAX, | 39 static_assert(arraysize(download_danger_names) == DOWNLOAD_DANGER_TYPE_MAX, |
| 40 download_danger_enum_has_changed); | 40 "download danger enum has changed"); |
| 41 | 41 |
| 42 } // namespace | 42 } // namespace |
| 43 | 43 |
| 44 base::Value* ItemActivatedNetLogCallback( | 44 base::Value* ItemActivatedNetLogCallback( |
| 45 const DownloadItem* download_item, | 45 const DownloadItem* download_item, |
| 46 DownloadType download_type, | 46 DownloadType download_type, |
| 47 const std::string* file_name, | 47 const std::string* file_name, |
| 48 net::NetLog::LogLevel log_level) { | 48 net::NetLog::LogLevel log_level) { |
| 49 base::DictionaryValue* dict = new base::DictionaryValue(); | 49 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 50 | 50 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 dict->SetString("operation", operation); | 199 dict->SetString("operation", operation); |
| 200 if (os_error != 0) | 200 if (os_error != 0) |
| 201 dict->SetInteger("os_error", os_error); | 201 dict->SetInteger("os_error", os_error); |
| 202 dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason)); | 202 dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason)); |
| 203 | 203 |
| 204 return dict; | 204 return dict; |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace content | 207 } // namespace content |
| OLD | NEW |