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

Unified Diff: chrome/utility/profile_import_handler.h

Issue 2470283002: Convert profile import IPCs to Mojo (Closed)
Patch Set: Use correct int types Created 4 years, 1 month 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
Index: chrome/utility/profile_import_handler.h
diff --git a/chrome/utility/profile_import_handler.h b/chrome/utility/profile_import_handler.h
index 02c43a5a8f8b0d32a4c76f8418816e321eab3417..d205f39e8508c260fa91780b78fedc4703d6a864 100644
--- a/chrome/utility/profile_import_handler.h
+++ b/chrome/utility/profile_import_handler.h
@@ -11,7 +11,9 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "chrome/common/importer/profile_import.mojom.h"
#include "chrome/utility/utility_message_handler.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
class ExternalProcessImporterBridge;
class Importer;
@@ -26,20 +28,22 @@ struct SourceProfile;
}
// Dispatches IPCs for out of process profile import.
-class ProfileImportHandler : public UtilityMessageHandler {
+class ProfileImportHandler : public chrome::mojom::ProfileImport {
public:
ProfileImportHandler();
~ProfileImportHandler() override;
- // IPC::Listener:
- bool OnMessageReceived(const IPC::Message& message) override;
+ static void Create(
+ mojo::InterfaceRequest<chrome::mojom::ProfileImport> request);
private:
- void OnImportStart(const importer::SourceProfile& source_profile,
- uint16_t items,
- const base::DictionaryValue& localized_strings);
- void OnImportCancel();
- void OnImportItemFinished(uint16_t item);
+ // chrome::mojom::ProfileImport:
+ void StartImport(const importer::SourceProfile& source_profile,
+ uint16_t items,
+ const base::DictionaryValue& localized_strings,
+ chrome::mojom::ProfileImportObserverPtr observer) override;
+ void CancelImport() override;
+ void ReportImportItemFinished(importer::ImportItem item) override;
// The following are used with out of process profile import:
void ImporterCleanup();
@@ -57,6 +61,8 @@ class ProfileImportHandler : public UtilityMessageHandler {
// Importer of the appropriate type (Firefox, Safari, IE, etc.)
scoped_refptr<Importer> importer_;
+
+ chrome::mojom::ProfileImportObserverPtr observer_;
};
sky 2016/11/14 23:12:18 DISALLOW...
tibell 2016/11/29 05:06:28 Done.
#endif // CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698