Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: content/browser/download/download_net_log_parameters.cc

Issue 19863005: Warn users about potentially unwanted downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a "Learn more" URL for unwanted downloads. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/public/browser/download_danger_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698