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

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

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

Powered by Google App Engine
This is Rietveld 408576698