| 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 13 matching lines...) Expand all Loading... |
| 24 }; | 24 }; |
| 25 static const char* download_danger_names[] = { | 25 static const char* download_danger_names[] = { |
| 26 "NOT_DANGEROUS", | 26 "NOT_DANGEROUS", |
| 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 }; | 35 }; |
| 35 | 36 |
| 36 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_type_names) == SRC_SAVE_PAGE_AS + 1, | 37 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_type_names) == SRC_SAVE_PAGE_AS + 1, |
| 37 download_type_enum_has_changed); | 38 download_type_enum_has_changed); |
| 38 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_danger_names) == | 39 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_danger_names) == |
| 39 DOWNLOAD_DANGER_TYPE_MAX, | 40 DOWNLOAD_DANGER_TYPE_MAX, |
| 40 download_danger_enum_has_changed); | 41 download_danger_enum_has_changed); |
| 41 | 42 |
| 42 } // namespace | 43 } // namespace |
| 43 | 44 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 199 |
| 199 dict->SetString("operation", operation); | 200 dict->SetString("operation", operation); |
| 200 if (os_error != 0) | 201 if (os_error != 0) |
| 201 dict->SetInteger("os_error", os_error); | 202 dict->SetInteger("os_error", os_error); |
| 202 dict->SetString("interrupt_reason", InterruptReasonDebugString(reason)); | 203 dict->SetString("interrupt_reason", InterruptReasonDebugString(reason)); |
| 203 | 204 |
| 204 return dict; | 205 return dict; |
| 205 } | 206 } |
| 206 | 207 |
| 207 } // namespace content | 208 } // namespace content |
| OLD | NEW |