| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 for (iter = p.image_refs().begin(); iter != p.image_refs().end(); ++iter) { | 267 for (iter = p.image_refs().begin(); iter != p.image_refs().end(); ++iter) { |
| 268 WriteParam(m, iter->type); | 268 WriteParam(m, iter->type); |
| 269 WriteParam(m, iter->width); | 269 WriteParam(m, iter->width); |
| 270 WriteParam(m, iter->height); | 270 WriteParam(m, iter->height); |
| 271 WriteParam(m, iter->url); | 271 WriteParam(m, iter->url); |
| 272 } | 272 } |
| 273 | 273 |
| 274 WriteParam(m, p.languages()); | 274 WriteParam(m, p.languages()); |
| 275 WriteParam(m, p.input_encodings()); | 275 WriteParam(m, p.input_encodings()); |
| 276 WriteParam(m, p.date_created()); | 276 WriteParam(m, p.date_created()); |
| 277 WriteParam(m, p.last_modified()); |
| 277 WriteParam(m, p.usage_count()); | 278 WriteParam(m, p.usage_count()); |
| 278 WriteParam(m, p.prepopulate_id()); | 279 WriteParam(m, p.prepopulate_id()); |
| 279 } | 280 } |
| 280 static bool Read(const Message* m, void** iter, param_type* p) { | 281 static bool Read(const Message* m, void** iter, param_type* p) { |
| 281 string16 short_name; | 282 string16 short_name; |
| 282 string16 description; | 283 string16 description; |
| 283 bool includes_suggestions_url; | 284 bool includes_suggestions_url; |
| 284 TemplateURLRef suggestions_url; | 285 TemplateURLRef suggestions_url; |
| 285 TemplateURLRef url; | 286 TemplateURLRef url; |
| 286 GURL originating_url; | 287 GURL originating_url; |
| 287 string16 keyword; | 288 string16 keyword; |
| 288 bool autogenerate_keyword; | 289 bool autogenerate_keyword; |
| 289 bool show_in_default_list; | 290 bool show_in_default_list; |
| 290 bool safe_for_autoreplace; | 291 bool safe_for_autoreplace; |
| 291 std::vector<string16> languages; | 292 std::vector<string16> languages; |
| 292 std::vector<std::string> input_encodings; | 293 std::vector<std::string> input_encodings; |
| 293 base::Time date_created; | 294 base::Time date_created; |
| 295 base::Time last_modified; |
| 294 int usage_count; | 296 int usage_count; |
| 295 int prepopulate_id; | 297 int prepopulate_id; |
| 296 | 298 |
| 297 if (!ReadParam(m, iter, &short_name) || | 299 if (!ReadParam(m, iter, &short_name) || |
| 298 !ReadParam(m, iter, &description)) | 300 !ReadParam(m, iter, &description)) |
| 299 return false; | 301 return false; |
| 300 | 302 |
| 301 if (!ReadParam(m, iter, &includes_suggestions_url)) | 303 if (!ReadParam(m, iter, &includes_suggestions_url)) |
| 302 return false; | 304 return false; |
| 303 if (includes_suggestions_url) { | 305 if (includes_suggestions_url) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 325 !ReadParam(m, iter, &width) || | 327 !ReadParam(m, iter, &width) || |
| 326 !ReadParam(m, iter, &height) || | 328 !ReadParam(m, iter, &height) || |
| 327 !ReadParam(m, iter, &url)) | 329 !ReadParam(m, iter, &url)) |
| 328 return false; | 330 return false; |
| 329 p->add_image_ref(TemplateURL::ImageRef(type, width, height, url)); | 331 p->add_image_ref(TemplateURL::ImageRef(type, width, height, url)); |
| 330 } | 332 } |
| 331 | 333 |
| 332 if (!ReadParam(m, iter, &languages) || | 334 if (!ReadParam(m, iter, &languages) || |
| 333 !ReadParam(m, iter, &input_encodings) || | 335 !ReadParam(m, iter, &input_encodings) || |
| 334 !ReadParam(m, iter, &date_created) || | 336 !ReadParam(m, iter, &date_created) || |
| 337 !ReadParam(m, iter, &last_modified) || |
| 335 !ReadParam(m, iter, &usage_count) || | 338 !ReadParam(m, iter, &usage_count) || |
| 336 !ReadParam(m, iter, &prepopulate_id)) | 339 !ReadParam(m, iter, &prepopulate_id)) |
| 337 return false; | 340 return false; |
| 338 | 341 |
| 339 p->set_short_name(short_name); | 342 p->set_short_name(short_name); |
| 340 p->set_description(description); | 343 p->set_description(description); |
| 341 p->SetSuggestionsURL(suggestions_url.url(), suggestions_url.index_offset(), | 344 p->SetSuggestionsURL(suggestions_url.url(), suggestions_url.index_offset(), |
| 342 suggestions_url.page_offset()); | 345 suggestions_url.page_offset()); |
| 343 p->SetURL(url.url(), url.index_offset(), url.page_offset()); | 346 p->SetURL(url.url(), url.index_offset(), url.page_offset()); |
| 344 p->set_originating_url(originating_url); | 347 p->set_originating_url(originating_url); |
| 345 p->set_keyword(keyword); | 348 p->set_keyword(keyword); |
| 346 p->set_autogenerate_keyword(autogenerate_keyword); | 349 p->set_autogenerate_keyword(autogenerate_keyword); |
| 347 p->set_show_in_default_list(show_in_default_list); | 350 p->set_show_in_default_list(show_in_default_list); |
| 348 p->set_safe_for_autoreplace(safe_for_autoreplace); | 351 p->set_safe_for_autoreplace(safe_for_autoreplace); |
| 349 | 352 |
| 350 std::vector<string16>::const_iterator lang_iter; | 353 std::vector<string16>::const_iterator lang_iter; |
| 351 for (lang_iter = languages.begin(); | 354 for (lang_iter = languages.begin(); |
| 352 lang_iter != languages.end(); | 355 lang_iter != languages.end(); |
| 353 ++lang_iter) { | 356 ++lang_iter) { |
| 354 p->add_language(*lang_iter); | 357 p->add_language(*lang_iter); |
| 355 } | 358 } |
| 356 p->set_input_encodings(input_encodings); | 359 p->set_input_encodings(input_encodings); |
| 357 p->set_date_created(date_created); | 360 p->set_date_created(date_created); |
| 361 p->set_last_modified(last_modified); |
| 358 p->set_usage_count(usage_count); | 362 p->set_usage_count(usage_count); |
| 359 p->set_prepopulate_id(prepopulate_id); | 363 p->set_prepopulate_id(prepopulate_id); |
| 360 return true; | 364 return true; |
| 361 } | 365 } |
| 362 static void Log(const param_type& p, std::string* l) { | 366 static void Log(const param_type& p, std::string* l) { |
| 363 l->append("<TemplateURL>"); | 367 l->append("<TemplateURL>"); |
| 364 } | 368 } |
| 365 }; | 369 }; |
| 366 | 370 |
| 367 } // namespace IPC | 371 } // namespace IPC |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFaviconsImportGroup, | 430 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFaviconsImportGroup, |
| 427 std::vector<history::ImportedFaviconUsage>) | 431 std::vector<history::ImportedFaviconUsage>) |
| 428 | 432 |
| 429 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady, | 433 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady, |
| 430 webkit_glue::PasswordForm) | 434 webkit_glue::PasswordForm) |
| 431 | 435 |
| 432 IPC_MESSAGE_CONTROL3(ProfileImportProcessHostMsg_NotifyKeywordsReady, | 436 IPC_MESSAGE_CONTROL3(ProfileImportProcessHostMsg_NotifyKeywordsReady, |
| 433 std::vector<TemplateURL>, | 437 std::vector<TemplateURL>, |
| 434 int, /* default keyword index */ | 438 int, /* default keyword index */ |
| 435 bool /* unique on host and path */) | 439 bool /* unique on host and path */) |
| OLD | NEW |