OLD | NEW |
(Empty) | |
| 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. |
| 4 // |
| 5 // Safe Browsing reporting protocol buffers. |
| 6 // |
| 7 // A ClientMalwareReportRequest is sent when a user opts-in to |
| 8 // sending detailed malware reports from the safe browsing interstitial page. |
| 9 // |
| 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. |
| 13 // |
| 14 // In addition to the url, a resource can contain HTTP request and response |
| 15 // headers and bodies. |
| 16 |
| 17 syntax = "proto2"; |
| 18 |
| 19 option optimize_for = LITE_RUNTIME; |
| 20 |
| 21 package safe_browsing; |
| 22 |
| 23 message ClientMalwareReportRequest { |
| 24 |
| 25 message HTTPHeader { |
| 26 required string name = 1; |
| 27 optional string value = 2; |
| 28 } |
| 29 |
| 30 message HTTPRequest { |
| 31 message FirstLine { |
| 32 optional string verb = 1; // Also known as method, eg "GET" |
| 33 optional string uri = 2; |
| 34 optional string version = 3; |
| 35 } |
| 36 |
| 37 optional FirstLine firstline = 1; |
| 38 repeated HTTPHeader headers = 2; |
| 39 optional string body = 3; |
| 40 |
| 41 // bodydigest and bodylength can be useful if the report does not |
| 42 // contain the body itself. |
| 43 optional string bodydigest = 4; |
| 44 optional int32 bodylength = 5; |
| 45 } |
| 46 |
| 47 message HTTPResponse { |
| 48 message FirstLine { |
| 49 optional int32 code = 1; |
| 50 optional string reason = 2; |
| 51 optional string version = 3; |
| 52 } |
| 53 |
| 54 optional FirstLine firstline = 1; |
| 55 repeated HTTPHeader headers = 2; |
| 56 optional string body = 3; |
| 57 |
| 58 // bodydigest and bodylength can be useful if the report does not |
| 59 // contain the body itself. |
| 60 optional string bodydigest = 4; |
| 61 optional int32 bodylength = 5; |
| 62 optional string remote_ip = 6; |
| 63 } |
| 64 |
| 65 message Resource { |
| 66 optional string url = 1; |
| 67 |
| 68 // URL of the parent frame. |
| 69 optional string parent = 2; |
| 70 |
| 71 // Tag that was used to include this resource, eg "iframe" |
| 72 optional string tag_name = 3; |
| 73 |
| 74 optional HTTPRequest request = 4; |
| 75 optional HTTPResponse response = 5; |
| 76 |
| 77 // A list of children. The order of the children in this list is |
| 78 // significant. The |parent| field for child nodes can be derived |
| 79 // from this, but this allows us to be more flexible. |
| 80 repeated string children = 6; |
| 81 } |
| 82 |
| 83 // URL of the resource that matches the safe browsing list. |
| 84 optional string malware_url = 1; |
| 85 |
| 86 // URL of the page in the address bar. |
| 87 optional string page_url = 2; |
| 88 |
| 89 optional string referrer_url = 3; |
| 90 repeated Resource nodes = 4; |
| 91 } |
OLD | NEW |