| 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/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 static const char* download_safety_names[] = { | 23 static const char* download_safety_names[] = { |
| 24 "SAFE", | 24 "SAFE", |
| 25 "DANGEROUS", | 25 "DANGEROUS", |
| 26 "DANGEROUS_BUT_VALIDATED" | 26 "DANGEROUS_BUT_VALIDATED" |
| 27 }; | 27 }; |
| 28 static const char* download_danger_names[] = { | 28 static const char* download_danger_names[] = { |
| 29 "NOT_DANGEROUS", | 29 "NOT_DANGEROUS", |
| 30 "DANGEROUS_FILE", | 30 "DANGEROUS_FILE", |
| 31 "DANGEROUS_URL", | 31 "DANGEROUS_URL", |
| 32 "DANGEROUS_CONTENT", | 32 "DANGEROUS_CONTENT", |
| 33 "MAYBE_DANGEROUS_CONTENT" | 33 "MAYBE_DANGEROUS_CONTENT", |
| 34 "UNCOMMON_CONTENT" |
| 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_safety_names) == | 39 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_safety_names) == |
| 39 content::DownloadItem::DANGEROUS_BUT_VALIDATED + 1, | 40 content::DownloadItem::DANGEROUS_BUT_VALIDATED + 1, |
| 40 downloaditem_safety_state_enum_has_changed); | 41 downloaditem_safety_state_enum_has_changed); |
| 41 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_danger_names) == | 42 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(download_danger_names) == |
| 42 content::DOWNLOAD_DANGER_TYPE_MAX, | 43 content::DOWNLOAD_DANGER_TYPE_MAX, |
| 43 download_danger_enum_has_changed); | 44 download_danger_enum_has_changed); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 Value* FileErrorParameters::ToValue() const { | 225 Value* FileErrorParameters::ToValue() const { |
| 225 DictionaryValue* dict = new DictionaryValue(); | 226 DictionaryValue* dict = new DictionaryValue(); |
| 226 | 227 |
| 227 dict->SetString("operation", operation_); | 228 dict->SetString("operation", operation_); |
| 228 dict->SetInteger("net_error", net_error_); | 229 dict->SetInteger("net_error", net_error_); |
| 229 | 230 |
| 230 return dict; | 231 return dict; |
| 231 } | 232 } |
| 232 | 233 |
| 233 } // namespace download_net_logs | 234 } // namespace download_net_logs |
| OLD | NEW |