1 // Copyright 2016 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef URL_IPC_URL_PARAM_TRAITS_H_ 6 #define URL_IPC_URL_PARAM_TRAITS_H_ 7 8 #include <string> 9 10 #include "ipc/ipc_param_traits.h" 11 #include "url/gurl.h" 12 #include "url/ipc/url_ipc_export.h" 13 14 namespace base { 15 class Pickle; 16 class PickleIterator; 17 } // namespace base 18 19 namespace IPC { 20 21 template <> 22 struct URL_IPC_EXPORT ParamTraits<GURL> { 23 typedef GURL param_type; 24 static void Write(base::Pickle* m, const param_type& p); 25 static bool Read(const base::Pickle* m, 26 base::PickleIterator* iter, 27 param_type* p); 28 static void Log(const param_type& p, std::string* l); 29 }; 30 31 } // namespace IPC 32 33 #endif // URL_IPC_URL_PARAM_TRAITS_H_ 34