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

Side by Side Diff: components/arc/common/arc_message_traits.cc

Issue 1475563002: arc-bridge: Implement IPC message for app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move spliting arc_bridge_service to another CL Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 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 #include "components/arc/common/arc_message_traits.h"
6
7 #include "ipc/param_traits_write_macros.h"
8 #include "ipc/param_traits_read_macros.h"
9 #include "ipc/param_traits_log_macros.h"
10
11 namespace IPC {
12
13 // static
14 void ParamTraits<arc::AppInfo>::Write(Message* m, const param_type& p) {
15 WriteParam(m, p.name);
16 WriteParam(m, p.package);
17 WriteParam(m, p.activity);
18 }
19
20 // static
21 bool ParamTraits<arc::AppInfo>::Read(const Message* m,
22 base::PickleIterator* iter,
23 param_type* r) {
24 if (!ReadParam(m, iter, &r->name) ||
25 !ReadParam(m, iter, &r->package) ||
26 !ReadParam(m, iter, &r->activity)) {
27 return false;
28 }
29
30 return true;
31 }
32
33 // static
34 void ParamTraits<arc::AppInfo>::Log(const param_type& p, std::string* l) {
35 LogParam(p.name, l);
36 l->append(" (");
37 LogParam(p.package, l);
38 l->append("/");
39 LogParam(p.activity, l);
40 l->append(")");
41 }
42
43 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698