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

Side by Side Diff: content/common/common_param_traits.h

Issue 6624066: Put file_system messages in their own file and move them to content, in prepa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 // This file is used to define IPC::ParamTraits<> specializations for a number 5 // This file is used to define IPC::ParamTraits<> specializations for a number
6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> 6 // of types so that they can be serialized over IPC. IPC::ParamTraits<>
7 // specializations for basic types (like int and std::string) and types in the 7 // specializations for basic types (like int and std::string) and types in the
8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains
9 // specializations for types that are used by the content code, and which need 9 // specializations for types that are used by the content code, and which need
10 // manual serialization code. This is usually because they're not structs with 10 // manual serialization code. This is usually because they're not structs with
11 // public members.. 11 // public members..
12 12
13 #ifndef CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ 13 #ifndef CONTENT_COMMON_COMMON_PARAM_TRAITS_H_
14 #define CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ 14 #define CONTENT_COMMON_COMMON_PARAM_TRAITS_H_
15 #pragma once 15 #pragma once
16 16
17 #include "base/platform_file.h"
17 #include "base/ref_counted.h" 18 #include "base/ref_counted.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 #include "ipc/ipc_message_utils.h" 20 #include "ipc/ipc_message_utils.h"
20 #include "net/url_request/url_request_status.h" 21 #include "net/url_request/url_request_status.h"
21 // !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!! 22 // !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!!
22 // 23 //
23 // That means don't add #includes to any file in 'webkit/' or 24 // That means don't add #includes to any file in 'webkit/' or
24 // 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and 25 // 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and
25 // content/common/ for a mini-library that doesn't depend on webkit. 26 // content/common/ for a mini-library that doesn't depend on webkit.
26 27
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 }; 102 };
102 103
103 template <> 104 template <>
104 struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > { 105 struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > {
105 typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type; 106 typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type;
106 static void Write(Message* m, const param_type& p); 107 static void Write(Message* m, const param_type& p);
107 static bool Read(const Message* m, void** iter, param_type* r); 108 static bool Read(const Message* m, void** iter, param_type* r);
108 static void Log(const param_type& p, std::string* l); 109 static void Log(const param_type& p, std::string* l);
109 }; 110 };
110 111
112 template <>
113 struct ParamTraits<base::PlatformFileInfo> {
114 typedef base::PlatformFileInfo param_type;
115 static void Write(Message* m, const param_type& p);
116 static bool Read(const Message* m, void** iter, param_type* r);
117 static void Log(const param_type& p, std::string* l);
118 };
119
120 template <>
121 struct SimilarTypeTraits<base::PlatformFileError> {
122 typedef int Type;
123 };
124
111 } // namespace IPC 125 } // namespace IPC
112 126
113 #endif // CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ 127 #endif // CONTENT_COMMON_COMMON_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « content/browser/file_system/file_system_dispatcher_host.cc ('k') | content/common/common_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698