| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_IMPORT_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_IMPORT_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "chrome/browser/importer/importer_observer.h" | |
| 11 | |
| 12 // This class is used by first_run::ImportNow to get notified of the outcome of | |
| 13 // the import operation. It differs from ImportProcessRunner in that this | |
| 14 // class executes in the context of the importing child process. | |
| 15 // The values that it handles are meant to be used as the process exit code. | |
| 16 class FirstRunImportObserver : public ImporterObserver { | |
| 17 public: | |
| 18 FirstRunImportObserver(); | |
| 19 virtual ~FirstRunImportObserver(); | |
| 20 | |
| 21 void RunLoop(); | |
| 22 | |
| 23 int import_result() const { return import_result_; } | |
| 24 | |
| 25 private: | |
| 26 void Finish(); | |
| 27 | |
| 28 // ImporterObserver: | |
| 29 virtual void ImportCompleted() OVERRIDE; | |
| 30 | |
| 31 bool loop_running_; | |
| 32 int import_result_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(FirstRunImportObserver); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_IMPORT_OBSERVER_H_ | |
| OLD | NEW |