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

Side by Side Diff: content/common/indexed_db/indexed_db_param_traits.h

Issue 10272018: Move IndexedDBKey, IndexedDBKeyRange into content namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use "using content::*" aliasing for IDB/SSV types Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_ 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_ 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "ipc/ipc_param_traits.h" 10 #include "ipc/ipc_param_traits.h"
11 11
12 namespace content {
12 class IndexedDBKey; 13 class IndexedDBKey;
14 class IndexedDBKeyPath;
13 class IndexedDBKeyRange; 15 class IndexedDBKeyRange;
14
15 namespace content {
16 class IndexedDBKeyPath;
17 class SerializedScriptValue; 16 class SerializedScriptValue;
18 } 17 }
19 18
20 namespace IPC { 19 namespace IPC {
21 20
22 // These datatypes are used by utility_messages.h and render_messages.h. 21 // These datatypes are used by utility_messages.h and render_messages.h.
23 // Unfortunately we can't move it to common: MSVC linker complains about 22 // Unfortunately we can't move it to common: MSVC linker complains about
24 // WebKit datatypes that are not linked on npchrome_frame (even though it's 23 // WebKit datatypes that are not linked on npchrome_frame (even though it's
25 // never actually used by that target). 24 // never actually used by that target).
26 25
27 template <> 26 template <>
28 struct ParamTraits<content::SerializedScriptValue> { 27 struct ParamTraits<content::SerializedScriptValue> {
29 typedef content::SerializedScriptValue param_type; 28 typedef content::SerializedScriptValue param_type;
30 static void Write(Message* m, const param_type& p); 29 static void Write(Message* m, const param_type& p);
31 static bool Read(const Message* m, PickleIterator* iter, param_type* r); 30 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
32 static void Log(const param_type& p, std::string* l); 31 static void Log(const param_type& p, std::string* l);
33 }; 32 };
34 33
35 template <> 34 template <>
36 struct ParamTraits<IndexedDBKey> { 35 struct ParamTraits<content::IndexedDBKey> {
37 typedef IndexedDBKey param_type; 36 typedef content::IndexedDBKey param_type;
37 static void Write(Message* m, const param_type& p);
38 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
39 static void Log(const param_type& p, std::string* l);
40 };
41
42 template <>
43 struct ParamTraits<content::IndexedDBKeyRange> {
44 typedef content::IndexedDBKeyRange param_type;
38 static void Write(Message* m, const param_type& p); 45 static void Write(Message* m, const param_type& p);
39 static bool Read(const Message* m, PickleIterator* iter, param_type* r); 46 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
40 static void Log(const param_type& p, std::string* l); 47 static void Log(const param_type& p, std::string* l);
41 }; 48 };
42 49
43 template <> 50 template <>
44 struct ParamTraits<content::IndexedDBKeyPath> { 51 struct ParamTraits<content::IndexedDBKeyPath> {
45 typedef content::IndexedDBKeyPath param_type; 52 typedef content::IndexedDBKeyPath param_type;
46 static void Write(Message* m, const param_type& p); 53 static void Write(Message* m, const param_type& p);
47 static bool Read(const Message* m, PickleIterator* iter, param_type* r); 54 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
48 static void Log(const param_type& p, std::string* l); 55 static void Log(const param_type& p, std::string* l);
49 };
50
51 template <>
52 struct ParamTraits<IndexedDBKeyRange> {
53 typedef IndexedDBKeyRange param_type;
54 static void Write(Message* m, const param_type& p);
55 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
56 static void Log(const param_type& p, std::string* l);
57 }; 56 };
58 57
59 } // namespace IPC 58 } // namespace IPC
60 59
61 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_ 60 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_messages.h ('k') | content/common/indexed_db/indexed_db_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698