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

Side by Side Diff: chrome/common/safe_browsing/safebrowsing_messages.h

Issue 1414343007: Collect threat details for phishing and UwS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included message file, so no include guard. 5 // Multiply-included message file, so no include guard.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 #define IPC_MESSAGE_START SafeBrowsingMsgStart 13 #define IPC_MESSAGE_START SafeBrowsingMsgStart
14 14
15 // A node is essentially a frame. 15 // A node is essentially a frame.
16 IPC_STRUCT_BEGIN(SafeBrowsingHostMsg_MalwareDOMDetails_Node) 16 IPC_STRUCT_BEGIN(SafeBrowsingHostMsg_ThreatDOMDetails_Node)
17 // URL of this resource. Can be empty. 17 // URL of this resource. Can be empty.
18 IPC_STRUCT_MEMBER(GURL, url) 18 IPC_STRUCT_MEMBER(GURL, url)
19 19
20 // If this resource was in the "src" attribute of a tag, this is the tagname 20 // If this resource was in the "src" attribute of a tag, this is the tagname
21 // (eg "IFRAME"). Can be empty. 21 // (eg "IFRAME"). Can be empty.
22 IPC_STRUCT_MEMBER(std::string, tag_name) 22 IPC_STRUCT_MEMBER(std::string, tag_name)
23 23
24 // URL of the parent node. Can be empty. 24 // URL of the parent node. Can be empty.
25 IPC_STRUCT_MEMBER(GURL, parent) 25 IPC_STRUCT_MEMBER(GURL, parent)
26 26
27 // children of this node. Can be emtpy. 27 // children of this node. Can be emtpy.
28 IPC_STRUCT_MEMBER(std::vector<GURL>, children) 28 IPC_STRUCT_MEMBER(std::vector<GURL>, children)
29 IPC_STRUCT_END() 29 IPC_STRUCT_END()
30 30
31 // SafeBrowsing client-side detection messages sent from the renderer to the 31 // SafeBrowsing client-side detection messages sent from the renderer to the
32 // browser. 32 // browser.
33 33
34 // Send part of the DOM to the browser, to be used in a malware report. 34 // Send part of the DOM to the browser, to be used in a threat report.
35 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_MalwareDOMDetails, 35 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_ThreatDOMDetails,
36 std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node>) 36 std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>)
37 37
38 #if defined(FULL_SAFE_BROWSING) 38 #if defined(FULL_SAFE_BROWSING)
39 // Inform the browser that the client-side phishing detector running in the 39 // Inform the browser that the client-side phishing detector running in the
40 // renderer is done classifying the current URL. If the URL is phishing 40 // renderer is done classifying the current URL. If the URL is phishing
41 // the request proto will have |is_phishing()| set to true. 41 // the request proto will have |is_phishing()| set to true.
42 // TODO(noelutz): we may want to create custom ParamTraits for MessageLite to 42 // TODO(noelutz): we may want to create custom ParamTraits for MessageLite to
43 // have a generic way to send protocol messages over IPC. 43 // have a generic way to send protocol messages over IPC.
44 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_PhishingDetectionDone, 44 IPC_MESSAGE_ROUTED1(SafeBrowsingHostMsg_PhishingDetectionDone,
45 std::string /* encoded ClientPhishingRequest proto */) 45 std::string /* encoded ClientPhishingRequest proto */)
46 #endif 46 #endif
47 47
48 // SafeBrowsing client-side detection messages sent from the browser to the 48 // SafeBrowsing client-side detection messages sent from the browser to the
49 // renderer. 49 // renderer.
50 50
51 // Request a DOM tree when a malware interstitial is shown. 51 // Request a DOM tree when a safe browsing interstitial is shown.
52 IPC_MESSAGE_ROUTED0(SafeBrowsingMsg_GetMalwareDOMDetails) 52 IPC_MESSAGE_ROUTED0(SafeBrowsingMsg_GetThreatDOMDetails)
53 53
54 #if defined(FULL_SAFE_BROWSING) 54 #if defined(FULL_SAFE_BROWSING)
55 // A classification model for client-side phishing detection. 55 // A classification model for client-side phishing detection.
56 // The string is an encoded safe_browsing::ClientSideModel protocol buffer, or 56 // The string is an encoded safe_browsing::ClientSideModel protocol buffer, or
57 // empty to disable client-side phishing detection for this renderer. 57 // empty to disable client-side phishing detection for this renderer.
58 IPC_MESSAGE_CONTROL1(SafeBrowsingMsg_SetPhishingModel, 58 IPC_MESSAGE_CONTROL1(SafeBrowsingMsg_SetPhishingModel,
59 std::string /* encoded ClientSideModel proto */) 59 std::string /* encoded ClientSideModel proto */)
60 60
61 // Tells the renderer to begin phishing detection for the given toplevel URL 61 // Tells the renderer to begin phishing detection for the given toplevel URL
62 // which it has started loading. 62 // which it has started loading.
63 IPC_MESSAGE_ROUTED1(SafeBrowsingMsg_StartPhishingDetection, 63 IPC_MESSAGE_ROUTED1(SafeBrowsingMsg_StartPhishingDetection,
64 GURL) 64 GURL)
65 #endif 65 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698