| OLD | NEW |
| 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_PROFILE_IMPORT_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // |import_process_client| implements callbacks which are triggered by | 31 // |import_process_client| implements callbacks which are triggered by |
| 32 // incoming IPC messages. This client creates an interface between IPC | 32 // incoming IPC messages. This client creates an interface between IPC |
| 33 // messages received by the ProfileImportProcessHost and the internal | 33 // messages received by the ProfileImportProcessHost and the internal |
| 34 // importer_bridge. | 34 // importer_bridge. |
| 35 // |thread_id| gives the thread where the client lives. The | 35 // |thread_id| gives the thread where the client lives. The |
| 36 // ProfileImportProcessHost spawns tasks on this thread for the client. | 36 // ProfileImportProcessHost spawns tasks on this thread for the client. |
| 37 ProfileImportProcessHost(ProfileImportProcessClient* import_process_client, | 37 ProfileImportProcessHost(ProfileImportProcessClient* import_process_client, |
| 38 BrowserThread::ID thread_id); | 38 BrowserThread::ID thread_id); |
| 39 virtual ~ProfileImportProcessHost(); | 39 virtual ~ProfileImportProcessHost(); |
| 40 | 40 |
| 41 // |source_profile|, |items|, and |import_to_bookmark_bar| are all needed by | 41 // |source_profile| and |items| are needed by the external importer process. |
| 42 // the external importer process. | |
| 43 bool StartProfileImportProcess(const importer::SourceProfile& source_profile, | 42 bool StartProfileImportProcess(const importer::SourceProfile& source_profile, |
| 44 uint16 items, | 43 uint16 items); |
| 45 bool import_to_bookmark_bar); | |
| 46 | 44 |
| 47 // Cancel the external import process. | 45 // Cancel the external import process. |
| 48 bool CancelProfileImportProcess(); | 46 bool CancelProfileImportProcess(); |
| 49 | 47 |
| 50 // Report that an item has been successfully imported. We need to make | 48 // Report that an item has been successfully imported. We need to make |
| 51 // sure that all import messages have come across the wire before the | 49 // sure that all import messages have come across the wire before the |
| 52 // external import process shuts itself down. | 50 // external import process shuts itself down. |
| 53 bool ReportImportItemFinished(importer::ImportItem item); | 51 bool ReportImportItemFinished(importer::ImportItem item); |
| 54 | 52 |
| 55 protected: | 53 protected: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 71 // Receives messages to be passed back to the importer host. | 69 // Receives messages to be passed back to the importer host. |
| 72 scoped_refptr<ProfileImportProcessClient> import_process_client_; | 70 scoped_refptr<ProfileImportProcessClient> import_process_client_; |
| 73 | 71 |
| 74 // The thread where the import_process_client_ lives. | 72 // The thread where the import_process_client_ lives. |
| 75 BrowserThread::ID thread_id_; | 73 BrowserThread::ID thread_id_; |
| 76 | 74 |
| 77 DISALLOW_COPY_AND_ASSIGN(ProfileImportProcessHost); | 75 DISALLOW_COPY_AND_ASSIGN(ProfileImportProcessHost); |
| 78 }; | 76 }; |
| 79 | 77 |
| 80 #endif // CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_HOST_H_ | 78 #endif // CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_HOST_H_ |
| OLD | NEW |