OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "components/network_hints/common/network_hints_common.h" | 9 #include "components/network_hints/common/network_hints_common.h" |
10 #include "content/public/common/common_param_traits.h" | 10 #include "content/public/common/common_param_traits.h" |
11 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
12 #include "ipc/ipc_message_utils.h" | 12 #include "ipc/ipc_message_utils.h" |
13 | 13 |
14 // Singly-included section for custom IPC traits. | 14 // Singly-included section for custom IPC traits. |
15 #ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ | 15 #ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ |
16 #define COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ | 16 #define COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ |
17 | 17 |
18 namespace IPC { | 18 namespace IPC { |
19 | 19 |
20 template <> | 20 template <> |
21 struct ParamTraits<network_hints::LookupRequest> { | 21 struct ParamTraits<network_hints::LookupRequest> { |
22 typedef network_hints::LookupRequest param_type; | 22 typedef network_hints::LookupRequest param_type; |
23 static void Write(Message* m, const param_type& p); | 23 static void Write(base::Pickle* m, const param_type& p); |
24 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 24 static bool Read(const base::Pickle* m, |
| 25 base::PickleIterator* iter, |
| 26 param_type* r); |
25 static void Log(const param_type& p, std::string* l); | 27 static void Log(const param_type& p, std::string* l); |
26 }; | 28 }; |
27 | 29 |
28 } // namespace IPC | 30 } // namespace IPC |
29 | 31 |
30 #endif // COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ | 32 #endif // COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ |
31 | 33 |
32 #define IPC_MESSAGE_START NetworkHintsMsgStart | 34 #define IPC_MESSAGE_START NetworkHintsMsgStart |
33 | 35 |
34 //----------------------------------------------------------------------------- | 36 //----------------------------------------------------------------------------- |
35 // Host messages | 37 // Host messages |
36 // These are messages sent from the renderer process to the browser process. | 38 // These are messages sent from the renderer process to the browser process. |
37 | 39 |
38 // Request for a DNS prefetch of the names in the array. | 40 // Request for a DNS prefetch of the names in the array. |
39 // NameList is typedef'ed std::vector<std::string> | 41 // NameList is typedef'ed std::vector<std::string> |
40 IPC_MESSAGE_CONTROL1(NetworkHintsMsg_DNSPrefetch, | 42 IPC_MESSAGE_CONTROL1(NetworkHintsMsg_DNSPrefetch, |
41 network_hints::LookupRequest) | 43 network_hints::LookupRequest) |
42 | 44 |
43 | 45 |
44 // Request for preconnect to host providing resource specified by URL | 46 // Request for preconnect to host providing resource specified by URL |
45 IPC_MESSAGE_CONTROL3(NetworkHintsMsg_Preconnect, | 47 IPC_MESSAGE_CONTROL3(NetworkHintsMsg_Preconnect, |
46 GURL /* preconnect target url */, | 48 GURL /* preconnect target url */, |
47 bool /* Does connection have its credentials flag set */, | 49 bool /* Does connection have its credentials flag set */, |
48 int /* number of connections */) | 50 int /* number of connections */) |
OLD | NEW |