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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 protected: | 116 protected: |
117 // Allow these methods to be overridden for tests. | 117 // Allow these methods to be overridden for tests. |
118 virtual FilePath GetProfileImportProcessCmd(); | 118 virtual FilePath GetProfileImportProcessCmd(); |
119 | 119 |
120 private: | 120 private: |
121 // Launch the new process. | 121 // Launch the new process. |
122 bool StartProcess(); | 122 bool StartProcess(); |
123 | 123 |
124 // Called by the external importer process to send messages back to the | 124 // Called by the external importer process to send messages back to the |
125 // ImportProcessClient. | 125 // ImportProcessClient. |
126 void OnMessageReceived(const IPC::Message& message); | 126 virtual void OnMessageReceived(const IPC::Message& message); |
127 | 127 |
128 // Overridden from BrowserChildProcessHost: | 128 // Overridden from BrowserChildProcessHost: |
129 virtual void OnProcessCrashed(); | 129 virtual void OnProcessCrashed(); |
130 virtual bool CanShutdown(); | 130 virtual bool CanShutdown(); |
131 virtual URLRequestContext* GetRequestContext( | 131 virtual URLRequestContext* GetRequestContext( |
132 uint32 request_id, | 132 uint32 request_id, |
133 const ViewHostMsg_Resource_Request& request_data); | 133 const ViewHostMsg_Resource_Request& request_data); |
134 | 134 |
135 // Receives messages to be passed back to the importer host. | 135 // Receives messages to be passed back to the importer host. |
136 scoped_refptr<ImportProcessClient> import_process_client_; | 136 scoped_refptr<ImportProcessClient> import_process_client_; |
137 | 137 |
138 // The thread where the import_process_client_ lives. | 138 // The thread where the import_process_client_ lives. |
139 BrowserThread::ID thread_id_; | 139 BrowserThread::ID thread_id_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(ProfileImportProcessHost); | 141 DISALLOW_COPY_AND_ASSIGN(ProfileImportProcessHost); |
142 }; | 142 }; |
143 | 143 |
144 #endif // CHROME_BROWSER_PROFILE_IMPORT_PROCESS_HOST_H_ | 144 #endif // CHROME_BROWSER_PROFILE_IMPORT_PROCESS_HOST_H_ |
OLD | NEW |