| 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_EXTERNAL_PROCESS_IMPORTER_HOST_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ | 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/importer/importer_host.h" | 11 #include "chrome/browser/importer/importer_host.h" |
| 12 | 12 |
| 13 class ExternalProcessImporterClient; | 13 class ExternalProcessImporterClient; |
| 14 class Profile; | 14 class Profile; |
| 15 class ProfileWriter; | 15 class ProfileWriter; |
| 16 | 16 |
| 17 namespace importer { | 17 namespace importer { |
| 18 struct SourceProfile; | 18 struct SourceProfile; |
| 19 } | 19 } |
| 20 | 20 |
| 21 // This class manages the import process. It creates the in-process half of the | 21 // This class manages the import process. It creates the in-process half of the |
| 22 // importer bridge and the external process importer client. | 22 // importer bridge and the external process importer client. |
| 23 class ExternalProcessImporterHost : public ImporterHost { | 23 class ExternalProcessImporterHost : public ImporterHost { |
| 24 public: | 24 public: |
| 25 ExternalProcessImporterHost(); | 25 ExternalProcessImporterHost(); |
| 26 | 26 |
| 27 // ImporterHost: | 27 // ImporterHost: |
| 28 virtual void Cancel() OVERRIDE; | 28 virtual void Cancel() OVERRIDE; |
| 29 | 29 |
| 30 protected: |
| 31 virtual ~ExternalProcessImporterHost(); |
| 32 |
| 30 private: | 33 private: |
| 31 // ImporterHost: | 34 // ImporterHost: |
| 32 virtual void StartImportSettings( | 35 virtual void StartImportSettings( |
| 33 const importer::SourceProfile& source_profile, | 36 const importer::SourceProfile& source_profile, |
| 34 Profile* target_profile, | 37 Profile* target_profile, |
| 35 uint16 items, | 38 uint16 items, |
| 36 ProfileWriter* writer, | 39 ProfileWriter* writer, |
| 37 bool first_run) OVERRIDE; | 40 bool first_run) OVERRIDE; |
| 38 virtual void InvokeTaskIfDone() OVERRIDE; | 41 virtual void InvokeTaskIfDone() OVERRIDE; |
| 39 virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE; | 42 virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 51 bool cancelled_; | 54 bool cancelled_; |
| 52 | 55 |
| 53 // True if the import process has been launched. This prevents race | 56 // True if the import process has been launched. This prevents race |
| 54 // conditions on import cancel. | 57 // conditions on import cancel. |
| 55 bool import_process_launched_; | 58 bool import_process_launched_; |
| 56 | 59 |
| 57 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterHost); | 60 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterHost); |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ | 63 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ |
| OLD | NEW |