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

Unified Diff: chrome/common/importer/profile_import.mojom

Issue 2470283002: Convert profile import IPCs to Mojo (Closed)
Patch Set: Merge Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/importer/importer_data_types.cc ('k') | chrome/common/importer/profile_import.typemap » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/importer/profile_import.mojom
diff --git a/chrome/common/importer/profile_import.mojom b/chrome/common/importer/profile_import.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..45a8757a7529d010c5597d856f2bfb4b934ef16c
--- /dev/null
+++ b/chrome/common/importer/profile_import.mojom
@@ -0,0 +1,84 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module chrome.mojom;
+
+import "components/autofill/content/common/autofill_types.mojom";
+import "mojo/common/common_custom_types.mojom";
+import "url/mojo/url.mojom";
+
+[Native]
+struct ImportedBookmarkEntry;
+
+[Native]
+struct ImporterAutofillFormDataEntry;
+
+[Native]
+struct SearchEngineInfo;
+
+[Native]
+struct ImporterURLRow;
+
+[Native]
+struct SourceProfile;
+
+[Native]
+struct FaviconUsageDataList;
+
+[Native]
+struct ImporterIE7PasswordInfo;
+
+[Native]
+enum ImportItem;
+
+// These are messages sent from the profile import process to the browser.
+// These messages send information about the status of the import and individual
+// import tasks.
+interface ProfileImportObserver {
+ OnImportStart();
+ OnImportFinished(bool succeeded, string error_msg);
+ OnImportItemStart(ImportItem item);
+ OnImportItemFinished(ImportItem item);
+
+ // These messages send data from the external importer process back to the
+ // process host so it can be written to the profile.
+ OnHistoryImportStart(uint32 total_history_rows_count);
+ OnHistoryImportGroup(
+ array<ImporterURLRow> history_rows_group,
+ int32 visit_source);
+ OnHomePageImportReady(url.mojom.Url home_page);
+ OnBookmarksImportStart(
+ mojo.common.mojom.String16 first_folder_name,
+ uint32 total_bookmarks_count);
+ OnBookmarksImportGroup(array<ImportedBookmarkEntry> bookmarks_group);
+ OnFaviconsImportStart(uint32 total_favicons_count);
+ OnFaviconsImportGroup(FaviconUsageDataList favicons_group);
+ OnPasswordFormImportReady(autofill.mojom.PasswordForm form);
+ OnKeywordsImportReady(
+ array<SearchEngineInfo> search_engines,
+ bool unique_on_host_and_path);
+ OnFirefoxSearchEngineDataReceived(array<string> search_engine_data);
+ OnAutofillFormDataImportStart(uint32 total_autofill_form_data_entry_count);
+ OnAutofillFormDataImportGroup(
+ array<ImporterAutofillFormDataEntry> autofill_form_data_entry_group);
+ // Windows only:
+ OnIE7PasswordReceived(ImporterIE7PasswordInfo importer_password_info);
+};
+
+// This interface is used to control the import process.
+interface ProfileImport {
+ // Start the importer. |items| is a bitmask of importer::ImportItem of items
+ // to import.
+ StartImport(
+ SourceProfile source_profile,
+ uint16 items,
+ mojo.common.mojom.DictionaryValue localized_strings,
+ ProfileImportObserver observer);
+
+ // Stop the importer.
+ CancelImport();
+
+ // Tell the importer that we're done with one item.
+ ReportImportItemFinished(ImportItem item);
+};
« no previous file with comments | « chrome/common/importer/importer_data_types.cc ('k') | chrome/common/importer/profile_import.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698