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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "content/public/browser/download_interrupt_reasons.h" | 14 #include "content/public/browser/download_interrupt_reasons.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 static const char* download_type_names[] = { | 22 static const char* const download_type_names[] = { |
23 "NEW_DOWNLOAD", | 23 "NEW_DOWNLOAD", |
24 "HISTORY_IMPORT", | 24 "HISTORY_IMPORT", |
25 "SAVE_PAGE_AS" | 25 "SAVE_PAGE_AS" |
26 }; | 26 }; |
27 static const char* download_danger_names[] = { | 27 static const char* const download_danger_names[] = { |
28 "NOT_DANGEROUS", | 28 "NOT_DANGEROUS", |
29 "DANGEROUS_FILE", | 29 "DANGEROUS_FILE", |
30 "DANGEROUS_URL", | 30 "DANGEROUS_URL", |
31 "DANGEROUS_CONTENT", | 31 "DANGEROUS_CONTENT", |
32 "MAYBE_DANGEROUS_CONTENT", | 32 "MAYBE_DANGEROUS_CONTENT", |
33 "UNCOMMON_CONTENT", | 33 "UNCOMMON_CONTENT", |
34 "USER_VALIDATED", | 34 "USER_VALIDATED", |
35 "DANGEROUS_HOST", | 35 "DANGEROUS_HOST", |
36 "POTENTIALLY_UNWANTED" | 36 "POTENTIALLY_UNWANTED" |
37 }; | 37 }; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 dict->SetString("operation", operation); | 203 dict->SetString("operation", operation); |
204 if (os_error != 0) | 204 if (os_error != 0) |
205 dict->SetInteger("os_error", os_error); | 205 dict->SetInteger("os_error", os_error); |
206 dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason)); | 206 dict->SetString("interrupt_reason", DownloadInterruptReasonToString(reason)); |
207 | 207 |
208 return std::move(dict); | 208 return std::move(dict); |
209 } | 209 } |
210 | 210 |
211 } // namespace content | 211 } // namespace content |
OLD | NEW |