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

Side by Side Diff: chrome/browser/importer/profile_import_process_messages.h

Issue 10381016: Remove the "autogenerate keyword" bit on TemplateURL. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 // Multiply-included message file, no traditonal include guard. 5 // Multiply-included message file, no traditonal include guard.
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 l->append(")"); 188 l->append(")");
189 } 189 }
190 }; // ParamTraits<history::ImportedFaviconUsage 190 }; // ParamTraits<history::ImportedFaviconUsage
191 191
192 // Traits for TemplateURLData 192 // Traits for TemplateURLData
193 template <> 193 template <>
194 struct ParamTraits<TemplateURLData> { 194 struct ParamTraits<TemplateURLData> {
195 typedef TemplateURLData param_type; 195 typedef TemplateURLData param_type;
196 static void Write(Message* m, const param_type& p) { 196 static void Write(Message* m, const param_type& p) {
197 WriteParam(m, p.short_name); 197 WriteParam(m, p.short_name);
198 WriteParam(m, p.raw_keyword()); 198 WriteParam(m, p.keyword());
199 WriteParam(m, p.autogenerate_keyword());
200 WriteParam(m, p.url()); 199 WriteParam(m, p.url());
201 WriteParam(m, p.suggestions_url); 200 WriteParam(m, p.suggestions_url);
202 WriteParam(m, p.instant_url); 201 WriteParam(m, p.instant_url);
203 WriteParam(m, p.favicon_url); 202 WriteParam(m, p.favicon_url);
204 WriteParam(m, p.originating_url); 203 WriteParam(m, p.originating_url);
205 WriteParam(m, p.show_in_default_list); 204 WriteParam(m, p.show_in_default_list);
206 WriteParam(m, p.safe_for_autoreplace); 205 WriteParam(m, p.safe_for_autoreplace);
207 WriteParam(m, p.input_encodings); 206 WriteParam(m, p.input_encodings);
208 WriteParam(m, p.id); 207 WriteParam(m, p.id);
209 WriteParam(m, p.date_created); 208 WriteParam(m, p.date_created);
210 WriteParam(m, p.last_modified); 209 WriteParam(m, p.last_modified);
211 WriteParam(m, p.created_by_policy); 210 WriteParam(m, p.created_by_policy);
212 WriteParam(m, p.usage_count); 211 WriteParam(m, p.usage_count);
213 WriteParam(m, p.prepopulate_id); 212 WriteParam(m, p.prepopulate_id);
214 WriteParam(m, p.sync_guid); 213 WriteParam(m, p.sync_guid);
215 } 214 }
216 static bool Read(const Message* m, PickleIterator* iter, param_type* p) { 215 static bool Read(const Message* m, PickleIterator* iter, param_type* p) {
217 string16 keyword; 216 string16 keyword;
218 bool autogenerate_keyword;
219 std::string url; 217 std::string url;
220 if (!ReadParam(m, iter, &p->short_name) || 218 if (!ReadParam(m, iter, &p->short_name) ||
221 !ReadParam(m, iter, &keyword) || 219 !ReadParam(m, iter, &keyword) ||
222 !ReadParam(m, iter, &autogenerate_keyword) ||
223 !ReadParam(m, iter, &url) || 220 !ReadParam(m, iter, &url) ||
224 !ReadParam(m, iter, &p->suggestions_url) || 221 !ReadParam(m, iter, &p->suggestions_url) ||
225 !ReadParam(m, iter, &p->instant_url) || 222 !ReadParam(m, iter, &p->instant_url) ||
226 !ReadParam(m, iter, &p->favicon_url) || 223 !ReadParam(m, iter, &p->favicon_url) ||
227 !ReadParam(m, iter, &p->originating_url) || 224 !ReadParam(m, iter, &p->originating_url) ||
228 !ReadParam(m, iter, &p->show_in_default_list) || 225 !ReadParam(m, iter, &p->show_in_default_list) ||
229 !ReadParam(m, iter, &p->safe_for_autoreplace) || 226 !ReadParam(m, iter, &p->safe_for_autoreplace) ||
230 !ReadParam(m, iter, &p->input_encodings) || 227 !ReadParam(m, iter, &p->input_encodings) ||
231 !ReadParam(m, iter, &p->id) || 228 !ReadParam(m, iter, &p->id) ||
232 !ReadParam(m, iter, &p->date_created) || 229 !ReadParam(m, iter, &p->date_created) ||
233 !ReadParam(m, iter, &p->last_modified) || 230 !ReadParam(m, iter, &p->last_modified) ||
234 !ReadParam(m, iter, &p->created_by_policy) || 231 !ReadParam(m, iter, &p->created_by_policy) ||
235 !ReadParam(m, iter, &p->usage_count) || 232 !ReadParam(m, iter, &p->usage_count) ||
236 !ReadParam(m, iter, &p->prepopulate_id) || 233 !ReadParam(m, iter, &p->prepopulate_id) ||
237 !ReadParam(m, iter, &p->sync_guid)) 234 !ReadParam(m, iter, &p->sync_guid))
238 return false; 235 return false;
239 p->SetKeyword(keyword); 236 p->SetKeyword(keyword);
240 p->SetAutogenerateKeyword(autogenerate_keyword);
241 p->SetURL(url); 237 p->SetURL(url);
242 return true; 238 return true;
243 } 239 }
244 static void Log(const param_type& p, std::string* l) { 240 static void Log(const param_type& p, std::string* l) {
245 l->append("<TemplateURLData>"); 241 l->append("<TemplateURLData>");
246 } 242 }
247 }; 243 };
248 244
249 // Traits for TemplateURL*. 245 // Traits for TemplateURL*.
250 // WARNING: These will cause us to allocate a new TemplateURL on the heap on the 246 // WARNING: These will cause us to allocate a new TemplateURL on the heap on the
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 332
337 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady, 333 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
338 webkit::forms::PasswordForm) 334 webkit::forms::PasswordForm)
339 335
340 // WARNING: The TemplateURL*s in the following message get heap-allocated on the 336 // WARNING: The TemplateURL*s in the following message get heap-allocated on the
341 // receiving end. The message handler for this message MUST take ownership of 337 // receiving end. The message handler for this message MUST take ownership of
342 // these pointers and ensure they're properly freed! 338 // these pointers and ensure they're properly freed!
343 IPC_MESSAGE_CONTROL2(ProfileImportProcessHostMsg_NotifyKeywordsReady, 339 IPC_MESSAGE_CONTROL2(ProfileImportProcessHostMsg_NotifyKeywordsReady,
344 std::vector<TemplateURL*>, 340 std::vector<TemplateURL*>,
345 bool /* unique on host and path */) 341 bool /* unique on host and path */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698