1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Safe Browsing reporting protocol buffers.
7 // A ClientMalwareReportRequest is sent when a user opts-in to
8 // sending detailed malware reports from the safe browsing interstitial page.
10 // It is a list of Resource messages, which may contain the url of a
11 // resource such as the page in the address bar or any other resource
12 // that was loaded for this page.
14 // In addition to the url, a resource can contain HTTP request and response
15 // headers and bodies.
19 option optimize_for = LITE_RUNTIME;
21 package safe_browsing;
23 message ClientMalwareReportRequest {
26 required bytes name = 1;
27 optional bytes value = 2;
32 optional bytes verb = 1; // Also known as method, eg "GET"
33 optional bytes uri = 2;
34 optional bytes version = 3;
37 optional FirstLine firstline = 1;
38 repeated HTTPHeader headers = 2;
39 optional bytes body = 3;
41 // bodydigest and bodylength can be useful if the report does not
42 // contain the body itself.
43 optional bytes bodydigest = 4;
44 optional int32 bodylength = 5;
47 message HTTPResponse {
49 optional int32 code = 1;
50 optional bytes reason = 2;
51 optional bytes version = 3;
54 optional FirstLine firstline = 1;
55 repeated HTTPHeader headers = 2;
56 optional bytes body = 3;
58 // bodydigest and bodylength can be useful if the report does not
59 // contain the body itself.
60 optional bytes bodydigest = 4;
61 optional int32 bodylength = 5;
62 optional bytes remote_ip = 6;
66 required int32 id = 1;
67 optional string url = 2;
68 optional HTTPRequest request = 3;
69 optional HTTPResponse response = 4;
71 optional int32 parent_id = 5; // Id of the parent, if known.
73 // A list of children. The order of the children in this list is
74 // significant. The |parent_id| field for child nodes can be derived
75 // from this, but this allows us to be more flexible.
76 repeated int32 child_ids = 6;
78 // Tag that was used to include this resource, eg "iframe"
79 optional string tag_name = 7;
82 // URL of the resource that matches the safe browsing list.
83 optional string malware_url = 1;
85 // URL of the page in the address bar.
86 optional string page_url = 2;
88 optional string referrer_url = 3;
89 repeated Resource resources = 4;
91 // Whether the report has HTTP Responses.
92 optional bool complete = 5;