| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PROFILE_IMPORT_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_PROFILE_IMPORT_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_PROFILE_IMPORT_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 virtual void OnFavIconsImportGroup( | 66 virtual void OnFavIconsImportGroup( |
| 67 const std::vector<history::ImportedFavIconUsage>& fav_icons_group) {} | 67 const std::vector<history::ImportedFavIconUsage>& fav_icons_group) {} |
| 68 | 68 |
| 69 virtual void OnPasswordFormImportReady( | 69 virtual void OnPasswordFormImportReady( |
| 70 const webkit_glue::PasswordForm& form) {} | 70 const webkit_glue::PasswordForm& form) {} |
| 71 | 71 |
| 72 virtual void OnKeywordsImportReady( | 72 virtual void OnKeywordsImportReady( |
| 73 const std::vector<TemplateURL>& template_urls, | 73 const std::vector<TemplateURL>& template_urls, |
| 74 int default_keyword_index, bool unique_on_host_and_path) {} | 74 int default_keyword_index, bool unique_on_host_and_path) {} |
| 75 | 75 |
| 76 virtual void OnMessageReceived(const IPC::Message& message); | 76 virtual bool OnMessageReceived(const IPC::Message& message); |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 friend class base::RefCountedThreadSafe<ImportProcessClient>; | 79 friend class base::RefCountedThreadSafe<ImportProcessClient>; |
| 80 | 80 |
| 81 virtual ~ImportProcessClient(); | 81 virtual ~ImportProcessClient(); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 friend class ProfileImportProcessHost; | 84 friend class ProfileImportProcessHost; |
| 85 | 85 |
| 86 DISALLOW_COPY_AND_ASSIGN(ImportProcessClient); | 86 DISALLOW_COPY_AND_ASSIGN(ImportProcessClient); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 115 protected: | 115 protected: |
| 116 // Allow these methods to be overridden for tests. | 116 // Allow these methods to be overridden for tests. |
| 117 virtual FilePath GetProfileImportProcessCmd(); | 117 virtual FilePath GetProfileImportProcessCmd(); |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 // Launch the new process. | 120 // Launch the new process. |
| 121 bool StartProcess(); | 121 bool StartProcess(); |
| 122 | 122 |
| 123 // Called by the external importer process to send messages back to the | 123 // Called by the external importer process to send messages back to the |
| 124 // ImportProcessClient. | 124 // ImportProcessClient. |
| 125 virtual void OnMessageReceived(const IPC::Message& message); | 125 virtual bool OnMessageReceived(const IPC::Message& message); |
| 126 | 126 |
| 127 // Overridden from BrowserChildProcessHost: | 127 // Overridden from BrowserChildProcessHost: |
| 128 virtual void OnProcessCrashed(int exit_code); | 128 virtual void OnProcessCrashed(int exit_code); |
| 129 virtual bool CanShutdown(); | 129 virtual bool CanShutdown(); |
| 130 | 130 |
| 131 // Receives messages to be passed back to the importer host. | 131 // Receives messages to be passed back to the importer host. |
| 132 scoped_refptr<ImportProcessClient> import_process_client_; | 132 scoped_refptr<ImportProcessClient> import_process_client_; |
| 133 | 133 |
| 134 // The thread where the import_process_client_ lives. | 134 // The thread where the import_process_client_ lives. |
| 135 BrowserThread::ID thread_id_; | 135 BrowserThread::ID thread_id_; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(ProfileImportProcessHost); | 137 DISALLOW_COPY_AND_ASSIGN(ProfileImportProcessHost); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 #endif // CHROME_BROWSER_PROFILE_IMPORT_PROCESS_HOST_H_ | 140 #endif // CHROME_BROWSER_PROFILE_IMPORT_PROCESS_HOST_H_ |
| OLD | NEW |