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

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

Issue 10533057: IPC plumbing for IndexedDB to snapshot metadata to the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't CamelCase "metadata" Created 8 years, 6 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 namespace content {
13 class IndexedDBDatabaseMetadata;
14 class IndexedDBIndexMetadata;
13 class IndexedDBKey; 15 class IndexedDBKey;
14 class IndexedDBKeyPath; 16 class IndexedDBKeyPath;
15 class IndexedDBKeyRange; 17 class IndexedDBKeyRange;
18 class IndexedDBObjectStoreMetadata;
16 class SerializedScriptValue; 19 class SerializedScriptValue;
17 } 20 }
18 21
19 namespace IPC { 22 namespace IPC {
20 23
21 // These datatypes are used by utility_messages.h and render_messages.h. 24 // These datatypes are used by utility_messages.h and render_messages.h.
22 // Unfortunately we can't move it to common: MSVC linker complains about 25 // Unfortunately we can't move it to common: MSVC linker complains about
23 // WebKit datatypes that are not linked on npchrome_frame (even though it's 26 // WebKit datatypes that are not linked on npchrome_frame (even though it's
24 // never actually used by that target). 27 // never actually used by that target).
25 28
(...skipping 22 matching lines...) Expand all
48 }; 51 };
49 52
50 template <> 53 template <>
51 struct ParamTraits<content::IndexedDBKeyPath> { 54 struct ParamTraits<content::IndexedDBKeyPath> {
52 typedef content::IndexedDBKeyPath param_type; 55 typedef content::IndexedDBKeyPath param_type;
53 static void Write(Message* m, const param_type& p); 56 static void Write(Message* m, const param_type& p);
54 static bool Read(const Message* m, PickleIterator* iter, param_type* r); 57 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
55 static void Log(const param_type& p, std::string* l); 58 static void Log(const param_type& p, std::string* l);
56 }; 59 };
57 60
61 template <>
62 struct ParamTraits<content::IndexedDBDatabaseMetadata> {
63 typedef content::IndexedDBDatabaseMetadata param_type;
64 static void Write(Message* m, const param_type& p);
65 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
66 static void Log(const param_type& p, std::string* l);
67 };
68
69 template <>
70 struct ParamTraits<content::IndexedDBObjectStoreMetadata> {
71 typedef content::IndexedDBObjectStoreMetadata param_type;
72 static void Write(Message* m, const param_type& p);
73 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
74 static void Log(const param_type& p, std::string* l);
75 };
76
77 template <>
78 struct ParamTraits<content::IndexedDBIndexMetadata> {
79 typedef content::IndexedDBIndexMetadata param_type;
80 static void Write(Message* m, const param_type& p);
81 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
82 static void Log(const param_type& p, std::string* l);
83 };
84
58 } // namespace IPC 85 } // namespace IPC
59 86
60 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_ 87 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698