15976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org// Use of this source code is governed by a BSD-style license that can be
35976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org// found in the LICENSE file.
45976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
55976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org#ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_DANGER_TYPE_H_
65976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org#define CONTENT_PUBLIC_BROWSER_DOWNLOAD_DANGER_TYPE_H_
75976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
85976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.orgnamespace content {
95976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
105976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org// This enum is also used by histograms.  Do not change the ordering or remove
115976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org// items.
125976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.orgenum DownloadDangerType {
135976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // The download is safe.
145976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS = 0,
155976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
165976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // A dangerous file to the system (e.g.: a pdf or extension from
175976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // places other than gallery).
185976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE,
195976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
205976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // Safebrowsing download service shows this URL leads to malicious file
215976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // download.
225976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_DANGEROUS_URL,
235976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
245976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // SafeBrowsing download service shows this file content as being malicious.
255976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT,
265976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
275976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // The content of this download may be malicious (e.g., extension is exe but
285976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // SafeBrowsing has not finished checking the content).
295976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT,
305976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
315976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // SafeBrowsing download service checked the contents of the download, but
325976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // didn't have enough data to determine whether it was malicious.
335976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT,
345976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
355976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // The download was evaluated to be one of the other types of danger,
365976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // but the user told us to go ahead anyway.
375976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_USER_VALIDATED,
385976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
395976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // SafeBrowsing download service checked the contents of the download and
405976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // didn't have data on this specific file, but the file was served from a host
415976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // known to serve mostly malicious content.
425976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST,
435976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
445976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // Applications and extensions that modify browser and/or computer settings
455976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED,
465976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
475976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // Memory space for histograms is determined by the max.
485976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  // ALWAYS ADD NEW VALUES BEFORE THIS ONE.
495976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org  DOWNLOAD_DANGER_TYPE_MAX
505976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org};
515976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
525976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org}
535976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org
545976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org#endif  // CONTENT_PUBLIC_BROWSER_DOWNLOAD_DANGER_TYPE_H_
555976650443d68ccfadf1dea24999ee459dd2819mflodman@webrtc.org