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

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

Issue 6683066: Remove render_messages_params files since they're not needed anymore. I moved the search provide... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/render_messages_params.h ('k') | chrome/common/search_provider.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/render_messages_params.h"
6
7 #include "chrome/common/render_messages.h"
8
9 namespace IPC {
10
11 void ParamTraits<ViewHostMsg_PageHasOSDD_Type>::Write(Message* m,
12 const param_type& p) {
13 m->WriteInt(p.type);
14 }
15
16 bool ParamTraits<ViewHostMsg_PageHasOSDD_Type>::Read(const Message* m,
17 void** iter,
18 param_type* p) {
19 int type;
20 if (!m->ReadInt(iter, &type))
21 return false;
22 p->type = static_cast<param_type::Type>(type);
23 return true;
24 }
25
26 void ParamTraits<ViewHostMsg_PageHasOSDD_Type>::Log(const param_type& p,
27 std::string* l) {
28 std::string type;
29 switch (p.type) {
30 case ViewHostMsg_PageHasOSDD_Type::AUTODETECTED_PROVIDER:
31 type = "ViewHostMsg_PageHasOSDD_Type::AUTODETECTED_PROVIDER";
32 break;
33 case ViewHostMsg_PageHasOSDD_Type::EXPLICIT_PROVIDER:
34 type = "ViewHostMsg_PageHasOSDD_Type::EXPLICIT_PROVIDER";
35 break;
36 case ViewHostMsg_PageHasOSDD_Type::EXPLICIT_DEFAULT_PROVIDER:
37 type = "ViewHostMsg_PageHasOSDD_Type::EXPLICIT_DEFAULT_PROVIDER";
38 break;
39 default:
40 type = "UNKNOWN";
41 break;
42 }
43 LogParam(type, l);
44 }
45
46 void ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params>::Write(
47 Message* m, const param_type& p) {
48 m->WriteInt(p.state);
49 }
50
51 bool ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params>::Read(
52 const Message* m, void** iter, param_type* p) {
53 int type;
54 if (!m->ReadInt(iter, &type))
55 return false;
56 p->state = static_cast<param_type::State>(type);
57 return true;
58 }
59
60 void ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params>::Log(
61 const param_type& p, std::string* l) {
62 std::string state;
63 switch (p.state) {
64 case ViewHostMsg_GetSearchProviderInstallState_Params::DENIED:
65 state = "ViewHostMsg_GetSearchProviderInstallState_Params::DENIED";
66 break;
67 case ViewHostMsg_GetSearchProviderInstallState_Params::NOT_INSTALLED:
68 state =
69 "ViewHostMsg_GetSearchProviderInstallState_Params::NOT_INSTALLED";
70 break;
71 case ViewHostMsg_GetSearchProviderInstallState_Params::
72 INSTALLED_BUT_NOT_DEFAULT:
73 state = "ViewHostMsg_GetSearchProviderInstallState_Params::"
74 "INSTALLED_BUT_NOT_DEFAULT";
75 break;
76 case ViewHostMsg_GetSearchProviderInstallState_Params::
77 INSTALLED_AS_DEFAULT:
78 state = "ViewHostMsg_GetSearchProviderInstallState_Params::"
79 "INSTALLED_AS_DEFAULT";
80 break;
81 default:
82 state = "UNKNOWN";
83 break;
84 }
85 LogParam(state, l);
86 }
87
88 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/render_messages_params.h ('k') | chrome/common/search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698