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

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

Issue 6698005: Convert importer messges to new format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | « no previous file | chrome/browser/importer/importer_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_MESSAGES_H_ 5 // Multiply-included message file, no traditonal include guard.
6 #define CHROME_BROWSER_IMPORTER_IMPORTER_MESSAGES_H_
7 #pragma once
8
9 #include <string> 6 #include <string>
10 #include <vector> 7 #include <vector>
11 8
12 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/values.h"
13 #include "chrome/browser/history/history_types.h" 11 #include "chrome/browser/history/history_types.h"
14 #include "chrome/browser/importer/importer_data_types.h" 12 #include "chrome/browser/importer/importer_data_types.h"
15 #include "chrome/browser/importer/profile_writer.h" 13 #include "chrome/browser/importer/profile_writer.h"
16 #include "chrome/browser/search_engines/template_url.h" 14 #include "chrome/browser/search_engines/template_url.h"
17 #include "chrome/common/common_param_traits.h" 15 #include "chrome/common/common_param_traits.h"
18 #include "content/common/common_param_traits.h" 16 #include "content/common/common_param_traits.h"
17 #include "ipc/ipc_message_macros.h"
19 #include "ipc/ipc_message_utils.h" 18 #include "ipc/ipc_message_utils.h"
19 #include "webkit/glue/password_form.h"
20
21 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_MESSAGES_H_
22 #define CHROME_BROWSER_IMPORTER_IMPORTER_MESSAGES_H_
20 23
21 namespace IPC { 24 namespace IPC {
22 25
23 // Traits for importer::ProfileInfo struct to pack/unpack. 26 // Traits for importer::ProfileInfo struct to pack/unpack.
24 template <> 27 template <>
25 struct ParamTraits<importer::ProfileInfo> { 28 struct ParamTraits<importer::ProfileInfo> {
26 typedef importer::ProfileInfo param_type; 29 typedef importer::ProfileInfo param_type;
27 static void Write(Message* m, const param_type& p) { 30 static void Write(Message* m, const param_type& p) {
28 WriteParam(m, p.description); 31 WriteParam(m, p.description);
29 WriteParam(m, static_cast<int>(p.browser_type)); 32 WriteParam(m, static_cast<int>(p.browser_type));
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 p->set_prepopulate_id(prepopulate_id); 358 p->set_prepopulate_id(prepopulate_id);
356 return true; 359 return true;
357 } 360 }
358 static void Log(const param_type& p, std::string* l) { 361 static void Log(const param_type& p, std::string* l) {
359 l->append("<TemplateURL>"); 362 l->append("<TemplateURL>");
360 } 363 }
361 }; 364 };
362 365
363 } // namespace IPC 366 } // namespace IPC
364 367
365 #include "chrome/browser/importer/importer_messages_internal.h" 368 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_MESSAGES_H_
366 369
367 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_MESSAGES_H_ 370 #define IPC_MESSAGE_START ProfileImportMsgStart
371
372 //-----------------------------------------------------------------------------
373 // ProfileImportProcess messages
374 // These are messages sent from the browser to the profile import process.
375 IPC_MESSAGE_CONTROL4(ProfileImportProcessMsg_StartImport,
376 importer::ProfileInfo /* ProfileInfo struct */,
377 int /* bitmask of items to import */,
378 DictionaryValue /* localized strings */,
379 bool /* import to bookmark bar */)
380
381 IPC_MESSAGE_CONTROL0(ProfileImportProcessMsg_CancelImport)
382
383 IPC_MESSAGE_CONTROL1(ProfileImportProcessMsg_ReportImportItemFinished,
384 int /* ImportItem */)
385
386 //---------------------------------------------------------------------------
387 // ProfileImportProcessHost messages
388 // These are messages sent from the profile import process to the browser.
389 // These messages send information about the status of the import and
390 // individual import tasks.
391 IPC_MESSAGE_CONTROL0(ProfileImportProcessHostMsg_Import_Started)
392
393 IPC_MESSAGE_CONTROL2(ProfileImportProcessHostMsg_Import_Finished,
394 bool /* was import successful? */,
395 std::string /* error message, if any */)
396
397 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_ImportItem_Started,
398 int /* ImportItem */)
399
400 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_ImportItem_Finished,
401 int /* ImportItem */)
402
403 // These messages send data from the external importer process back to
404 // the process host so it can be written to the profile.
405 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyHistoryImportStart,
406 int /* total number of history::URLRow items */)
407
408 IPC_MESSAGE_CONTROL2(ProfileImportProcessHostMsg_NotifyHistoryImportGroup,
409 std::vector<history::URLRow>,
410 int /* the source of URLs as in history::VisitSource.*/
411 /* To simplify IPC call, pass as an integer */)
412
413 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyHomePageImportReady,
414 GURL /* GURL of home page */)
415
416 IPC_MESSAGE_CONTROL3(ProfileImportProcessHostMsg_NotifyBookmarksImportStart,
417 std::wstring /* first folder name */,
418 int /* options */,
419 int /* total number of bookmarks */)
420
421 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyBookmarksImportGroup,
422 std::vector<ProfileWriter::BookmarkEntry>)
423
424 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFavIconsImportStart,
425 int /* total number of FavIcons */)
426
427 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup,
428 std::vector<history::ImportedFavIconUsage> )
429
430 IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
431 webkit_glue::PasswordForm )
432
433 IPC_MESSAGE_CONTROL3(ProfileImportProcessHostMsg_NotifyKeywordsReady,
434 std::vector<TemplateURL>,
435 int, /* default keyword index */
436 bool /* unique on host and path */)
437
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/importer/importer_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698