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 // This proto file includes: | 5 // This proto file includes: |
6 // (1) Client side phishing and malware detection request and response | 6 // (1) Client side phishing and malware detection request and response |
7 // protocol buffers. Those protocol messages should be kept in sync | 7 // protocol buffers. Those protocol messages should be kept in sync |
8 // with the server implementation. | 8 // with the server implementation. |
9 // | 9 // |
10 // (2) Safe Browsing reporting protocol buffers. | 10 // (2) Safe Browsing reporting protocol buffers. |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
828 optional bool did_proceed = 8; | 828 optional bool did_proceed = 8; |
829 | 829 |
830 // Whether user visited this origin before. | 830 // Whether user visited this origin before. |
831 optional bool repeat_visit = 9; | 831 optional bool repeat_visit = 9; |
832 | 832 |
833 // The same token in ClientDownloadResponse. This field is only set if its | 833 // The same token in ClientDownloadResponse. This field is only set if its |
834 // report type is DANGEROUS_DOWNLOAD_RECOVERY, DANGEROUS_DOWNLOAD_WARNING or | 834 // report type is DANGEROUS_DOWNLOAD_RECOVERY, DANGEROUS_DOWNLOAD_WARNING or |
835 // DANGEROUS_DOWNLOAD_BY_API. | 835 // DANGEROUS_DOWNLOAD_BY_API. |
836 optional bytes token = 15; | 836 optional bytes token = 15; |
837 } | 837 } |
838 | |
839 // Canonical representation of raster image data. | |
840 message ImageData { | |
841 // Image bitmap encoded as PNG, after downscaling to <= 512x512. | |
842 optional bytes png_data = 1; | |
Nathan Parker
2017/01/19 01:22:09
awoz@ has requested that this be "data" and that w
harkness
2017/01/19 16:20:55
I added in mime_type as a field, and it's hard cod
| |
843 | |
844 message Dimensions { | |
845 optional int32 width = 1; | |
846 optional int32 height = 2; | |
847 } | |
848 | |
849 optional Dimensions dimensions = 2; | |
850 optional Dimensions original_dimensions = 3; // iff downscaled | |
851 } | |
852 | |
853 // Reporting protobuf for an image served as part of a browser notification. | |
854 // There is no response (an empty body) to this request. | |
855 message NotificationImageReportRequest { | |
856 optional string notification_origin = 1; // Src-origin of the notification. | |
857 optional ImageData image = 2; // The bitmap of the image. | |
858 | |
859 // Note that the image URL is deliberately omitted as it would be untrusted, | |
860 // since the notification image fetch may be intercepted by a Service Worker | |
861 // (even if the image URL is cross-origin). Otherwise a website could mislead | |
862 // Safe Browsing into associating phishing image bitmaps with safe image URLs. | |
863 } | |
OLD | NEW |