OLD | NEW |
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 #ifndef CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ | 5 #ifndef CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ |
6 #define CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ | 6 #define CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 22 matching lines...) Expand all Loading... |
33 ProfileImportHandler(); | 33 ProfileImportHandler(); |
34 ~ProfileImportHandler() override; | 34 ~ProfileImportHandler() override; |
35 | 35 |
36 static void Create( | 36 static void Create( |
37 mojo::InterfaceRequest<chrome::mojom::ProfileImport> request); | 37 mojo::InterfaceRequest<chrome::mojom::ProfileImport> request); |
38 | 38 |
39 private: | 39 private: |
40 // chrome::mojom::ProfileImport: | 40 // chrome::mojom::ProfileImport: |
41 void StartImport(const importer::SourceProfile& source_profile, | 41 void StartImport(const importer::SourceProfile& source_profile, |
42 uint16_t items, | 42 uint16_t items, |
43 const base::DictionaryValue& localized_strings, | 43 std::unique_ptr<base::DictionaryValue> localized_strings, |
44 chrome::mojom::ProfileImportObserverPtr observer) override; | 44 chrome::mojom::ProfileImportObserverPtr observer) override; |
45 void CancelImport() override; | 45 void CancelImport() override; |
46 void ReportImportItemFinished(importer::ImportItem item) override; | 46 void ReportImportItemFinished(importer::ImportItem item) override; |
47 | 47 |
48 // The following are used with out of process profile import: | 48 // The following are used with out of process profile import: |
49 void ImporterCleanup(); | 49 void ImporterCleanup(); |
50 | 50 |
51 // Thread that importer runs on, while ProfileImportThread handles messages | 51 // Thread that importer runs on, while ProfileImportThread handles messages |
52 // from the browser process. | 52 // from the browser process. |
53 std::unique_ptr<base::Thread> import_thread_; | 53 std::unique_ptr<base::Thread> import_thread_; |
54 | 54 |
55 // Bridge object is passed to importer, so that it can send IPC calls | 55 // Bridge object is passed to importer, so that it can send IPC calls |
56 // directly back to the ProfileImportProcessHost. | 56 // directly back to the ProfileImportProcessHost. |
57 scoped_refptr<ExternalProcessImporterBridge> bridge_; | 57 scoped_refptr<ExternalProcessImporterBridge> bridge_; |
58 | 58 |
59 // A bitmask of importer::ImportItem. | 59 // A bitmask of importer::ImportItem. |
60 uint16_t items_to_import_; | 60 uint16_t items_to_import_; |
61 | 61 |
62 // Importer of the appropriate type (Firefox, Safari, IE, etc.) | 62 // Importer of the appropriate type (Firefox, Safari, IE, etc.) |
63 scoped_refptr<Importer> importer_; | 63 scoped_refptr<Importer> importer_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(ProfileImportHandler); | 65 DISALLOW_COPY_AND_ASSIGN(ProfileImportHandler); |
66 }; | 66 }; |
67 | 67 |
68 #endif // CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ | 68 #endif // CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ |
OLD | NEW |