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_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ |
6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ | 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 uint16 items, | 51 uint16 items, |
52 InProcessImporterBridge* bridge); | 52 InProcessImporterBridge* bridge); |
53 | 53 |
54 // Launches the task to start the external process. | 54 // Launches the task to start the external process. |
55 void Start(); | 55 void Start(); |
56 | 56 |
57 // Called by the ExternalProcessImporterHost on import cancel. | 57 // Called by the ExternalProcessImporterHost on import cancel. |
58 void Cancel(); | 58 void Cancel(); |
59 | 59 |
60 // UtilityProcessHostClient implementation: | 60 // UtilityProcessHostClient implementation: |
61 virtual void OnProcessCrashed(int exit_code) override; | 61 void OnProcessCrashed(int exit_code) override; |
62 virtual bool OnMessageReceived(const IPC::Message& message) override; | 62 bool OnMessageReceived(const IPC::Message& message) override; |
63 | 63 |
64 // Message handlers | 64 // Message handlers |
65 void OnImportStart(); | 65 void OnImportStart(); |
66 void OnImportFinished(bool succeeded, const std::string& error_msg); | 66 void OnImportFinished(bool succeeded, const std::string& error_msg); |
67 void OnImportItemStart(int item); | 67 void OnImportItemStart(int item); |
68 void OnImportItemFinished(int item); | 68 void OnImportItemFinished(int item); |
69 void OnHistoryImportStart(size_t total_history_rows_count); | 69 void OnHistoryImportStart(size_t total_history_rows_count); |
70 void OnHistoryImportGroup( | 70 void OnHistoryImportGroup( |
71 const std::vector<ImporterURLRow>& history_rows_group, | 71 const std::vector<ImporterURLRow>& history_rows_group, |
72 int visit_source); | 72 int visit_source); |
(...skipping 14 matching lines...) Expand all Loading... |
87 void OnAutofillFormDataImportStart( | 87 void OnAutofillFormDataImportStart( |
88 size_t total_autofill_form_data_entry_count); | 88 size_t total_autofill_form_data_entry_count); |
89 void OnAutofillFormDataImportGroup(const std::vector< | 89 void OnAutofillFormDataImportGroup(const std::vector< |
90 ImporterAutofillFormDataEntry>& autofill_form_data_entry_group); | 90 ImporterAutofillFormDataEntry>& autofill_form_data_entry_group); |
91 #if defined(OS_WIN) | 91 #if defined(OS_WIN) |
92 void OnIE7PasswordReceived( | 92 void OnIE7PasswordReceived( |
93 const importer::ImporterIE7PasswordInfo& importer_password_info); | 93 const importer::ImporterIE7PasswordInfo& importer_password_info); |
94 #endif | 94 #endif |
95 | 95 |
96 protected: | 96 protected: |
97 virtual ~ExternalProcessImporterClient(); | 97 ~ExternalProcessImporterClient() override; |
98 | 98 |
99 private: | 99 private: |
100 // Notifies the importerhost that import has finished, and calls Release(). | 100 // Notifies the importerhost that import has finished, and calls Release(). |
101 void Cleanup(); | 101 void Cleanup(); |
102 | 102 |
103 // Cancel import process on IO thread. | 103 // Cancel import process on IO thread. |
104 void CancelImportProcessOnIOThread(); | 104 void CancelImportProcessOnIOThread(); |
105 | 105 |
106 // Report item completely downloaded on IO thread. | 106 // Report item completely downloaded on IO thread. |
107 void NotifyItemFinishedOnIOThread(importer::ImportItem import_item); | 107 void NotifyItemFinishedOnIOThread(importer::ImportItem import_item); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // ProfileWriter. | 153 // ProfileWriter. |
154 scoped_refptr<InProcessImporterBridge> bridge_; | 154 scoped_refptr<InProcessImporterBridge> bridge_; |
155 | 155 |
156 // True if import process has been cancelled. | 156 // True if import process has been cancelled. |
157 bool cancelled_; | 157 bool cancelled_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient); | 159 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient); |
160 }; | 160 }; |
161 | 161 |
162 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ | 162 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ |
OLD | NEW |