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_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ |
6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ | 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/importer/importer_bridge.h" | 13 #include "chrome/browser/importer/importer_bridge.h" |
14 #include "chrome/browser/importer/profile_writer.h" | 14 #include "chrome/browser/importer/profile_writer.h" |
15 #include "ipc/ipc_message.h" | |
16 | 15 |
17 class GURL; | 16 class GURL; |
18 | 17 |
19 namespace base { | 18 namespace base { |
20 class DictionaryValue; | 19 class DictionaryValue; |
21 class TaskRunner; | 20 class TaskRunner; |
22 } | 21 } |
23 | 22 |
| 23 namespace IPC { |
| 24 class Message; |
| 25 class Sender; |
| 26 } |
| 27 |
24 // When the importer is run in an external process, the bridge is effectively | 28 // When the importer is run in an external process, the bridge is effectively |
25 // split in half by the IPC infrastructure. The external bridge receives data | 29 // split in half by the IPC infrastructure. The external bridge receives data |
26 // and notifications from the importer, and sends it across IPC. The | 30 // and notifications from the importer, and sends it across IPC. The |
27 // internal bridge gathers the data from the IPC host and writes it to the | 31 // internal bridge gathers the data from the IPC host and writes it to the |
28 // profile. | 32 // profile. |
29 class ExternalProcessImporterBridge : public ImporterBridge { | 33 class ExternalProcessImporterBridge : public ImporterBridge { |
30 public: | 34 public: |
31 ExternalProcessImporterBridge( | 35 ExternalProcessImporterBridge( |
32 const base::DictionaryValue& localized_strings, | 36 const base::DictionaryValue& localized_strings, |
33 IPC::Sender* sender, | 37 IPC::Sender* sender, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // bundle isn't available to the external process. | 79 // bundle isn't available to the external process. |
76 scoped_ptr<base::DictionaryValue> localized_strings_; | 80 scoped_ptr<base::DictionaryValue> localized_strings_; |
77 | 81 |
78 IPC::Sender* sender_; | 82 IPC::Sender* sender_; |
79 scoped_refptr<base::TaskRunner> task_runner_; | 83 scoped_refptr<base::TaskRunner> task_runner_; |
80 | 84 |
81 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterBridge); | 85 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterBridge); |
82 }; | 86 }; |
83 | 87 |
84 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ | 88 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ |
OLD | NEW |