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

Side by Side Diff: chrome/common/utility_messages.h

Issue 460119: Move the utility process messages to their own file now that we have more tha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/common/utility_messages_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
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 CHROME_COMMON_UTILITY_MESSAGES_H_
6 #define CHROME_COMMON_UTILITY_MESSAGES_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/file_path.h"
13 #include "base/values.h"
14 #include "chrome/common/common_param_traits.h"
15 #include "chrome/common/extensions/update_manifest.h"
16 #include "ipc/ipc_message_utils.h"
17
18 namespace IPC {
19
20 // Traits for UpdateManifest::Result.
21 template <>
22 struct ParamTraits<UpdateManifest::Result> {
23 typedef UpdateManifest::Result param_type;
24 static void Write(Message* m, const param_type& p) {
25 WriteParam(m, p.extension_id);
26 WriteParam(m, p.version);
27 WriteParam(m, p.browser_min_version);
28 WriteParam(m, p.package_hash);
29 WriteParam(m, p.crx_url);
30 }
31 static bool Read(const Message* m, void** iter, param_type* p) {
32 return ReadParam(m, iter, &p->extension_id) &&
33 ReadParam(m, iter, &p->version) &&
34 ReadParam(m, iter, &p->browser_min_version) &&
35 ReadParam(m, iter, &p->package_hash) &&
36 ReadParam(m, iter, &p->crx_url);
37 }
38 static void Log(const param_type& p, std::wstring* l) {
39 l->append(L"(");
40 LogParam(p.extension_id, l);
41 l->append(L", ");
42 LogParam(p.version, l);
43 l->append(L", ");
44 LogParam(p.browser_min_version, l);
45 l->append(L", ");
46 LogParam(p.package_hash, l);
47 l->append(L", ");
48 LogParam(p.crx_url, l);
49 l->append(L")");
50 }
51 };
52
53 } // namespace IPC
54
55 #define MESSAGES_INTERNAL_FILE "chrome/common/utility_messages_internal.h"
56 #include "ipc/ipc_message_macros.h"
57
58 #endif // CHROME_COMMON_UTILITY_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/common/utility_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698