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

Unified Diff: components/dns_prefetch/common/prefetch_messages.h

Issue 644123002: Componentize renderer side of DNS prefetching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: components/dns_prefetch/common/prefetch_messages.h
diff --git a/components/dns_prefetch/common/prefetch_messages.h b/components/dns_prefetch/common/prefetch_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..d12ac74e2ac5c5a89d432c1f124dfe50a3c87819
--- /dev/null
+++ b/components/dns_prefetch/common/prefetch_messages.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Multiply-included file, no traditional include guard.
+#include <string>
+#include <vector>
+
+#include "components/dns_prefetch/common/prefetch_common.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_message_utils.h"
+
+// Singly-included section for custom IPC traits.
+#ifndef COMPONENTS_DNS_PREFETCH_COMMON_PREFETCH_MESSAGES_H_
+#define COMPONENTS_DNS_PREFETCH_COMMON_PREFETCH_MESSAGES_H_
+
+namespace IPC {
+
+template <>
+struct ParamTraits<dns_prefetch::LookupRequest> {
+ typedef dns_prefetch::LookupRequest param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+} // namespace IPC
+
+#endif // COMPONENTS_DNS_PREFETCH_COMMON_PREFETCH_MESSAGES_H_
+
+#define IPC_MESSAGE_START DnsPrefetchMsgStart
+
+//-----------------------------------------------------------------------------
+// Host messages
+// These are messages sent from the renderer process to the browser process.
+
+// Request for a DNS prefetch of the names in the array.
+// NameList is typedef'ed std::vector<std::string>
+IPC_MESSAGE_CONTROL1(DnsPrefetchMsg_RequestPrefetch,
+ dns_prefetch::LookupRequest)

Powered by Google App Engine
This is Rietveld 408576698