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

Side by Side Diff: chrome/common/icon_messages.cc

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error for clank mac and unit test memory leak Created 9 years, 8 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
« no previous file with comments | « chrome/common/icon_messages.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/common/icon_messages.h"
6
7 #include "content/common/common_param_traits.h"
8
9 FaviconURL::FaviconURL()
10 : icon_type(INVALID_ICON) {
11 }
12
13 FaviconURL::FaviconURL(const GURL& url, IconType type)
14 : icon_url(url),
15 icon_type(type) {
16 }
17
18 FaviconURL::~FaviconURL() {
19 }
20
21 namespace IPC {
22
23 // static
24 void ParamTraits<IconType>::Write(Message* m, const param_type& p) {
25 m->WriteInt(p);
26 }
27
28 // static
29 bool ParamTraits<IconType>::Read(const Message* m, void** iter, param_type* p) {
30 int type;
31 if (!m->ReadInt(iter, &type))
32 return false;
33 *p = static_cast<IconType>(type);
34 return true;
35 }
36
37 // static
38 void ParamTraits<IconType>::Log(const param_type& p, std::string* l) {
39 l->append("IconType");
40 }
41
42 // static
43 void ParamTraits<FaviconURL>::Write(Message* m, const param_type& p) {
44 WriteParam(m, p.icon_url);
45 WriteParam(m, p.icon_type);
46 }
47
48 // static
49 bool ParamTraits<FaviconURL>::Read(const Message* m,
50 void** iter,
51 param_type* p) {
52 return ReadParam(m, iter, &p->icon_url) && ReadParam(m, iter, &p->icon_type);
53 }
54
55 // static
56 void ParamTraits<FaviconURL>::Log(const param_type& p, std::string* l) {
57 l->append("<FaviconURL>");
58 }
59
60 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/icon_messages.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698