| 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_IMPORTER_HOST_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_HOST_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_HOST_H_ | 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 void SetObserver(importer::ImporterProgressObserver* observer); | 48 void SetObserver(importer::ImporterProgressObserver* observer); |
| 49 | 49 |
| 50 // A series of functions invoked at the start, during and end of the import | 50 // A series of functions invoked at the start, during and end of the import |
| 51 // process. The middle functions are notifications that the a harvesting of a | 51 // process. The middle functions are notifications that the a harvesting of a |
| 52 // particular source of data (specified by |item|) is under way. | 52 // particular source of data (specified by |item|) is under way. |
| 53 void NotifyImportStarted(); | 53 void NotifyImportStarted(); |
| 54 void NotifyImportItemStarted(importer::ImportItem item); | 54 void NotifyImportItemStarted(importer::ImportItem item); |
| 55 void NotifyImportItemEnded(importer::ImportItem item); | 55 void NotifyImportItemEnded(importer::ImportItem item); |
| 56 void NotifyImportEnded(); | 56 void NotifyImportEnded(); |
| 57 | 57 |
| 58 // When in headless mode, the importer will not show the warning dialog and | 58 // When in headless mode, the importer will not show any warning dialog if |
| 59 // the outcome is as if the user had canceled the import operation. | 59 // a user action is required (e.g., Firefox profile is locked and user should |
| 60 // close Firefox to continue) and the outcome is as if the user had canceled |
| 61 // the import operation. |
| 60 void set_headless() { headless_ = true; } | 62 void set_headless() { headless_ = true; } |
| 61 bool is_headless() const { return headless_; } | 63 bool is_headless() const { return headless_; } |
| 62 | 64 |
| 63 void set_parent_window(gfx::NativeWindow parent_window) { | 65 void set_parent_window(gfx::NativeWindow parent_window) { |
| 64 parent_window_ = parent_window; | 66 parent_window_ = parent_window; |
| 65 } | 67 } |
| 66 | 68 |
| 67 void set_browser(Browser* browser) { browser_ = browser; } | 69 void set_browser(Browser* browser) { browser_ = browser; } |
| 68 | 70 |
| 69 // Starts the process of importing the settings and data depending on what the | 71 // Starts the process of importing the settings and data depending on what the |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // The observer that we need to notify about changes in the import process. | 166 // The observer that we need to notify about changes in the import process. |
| 165 importer::ImporterProgressObserver* observer_; | 167 importer::ImporterProgressObserver* observer_; |
| 166 | 168 |
| 167 // Firefox profile lock. | 169 // Firefox profile lock. |
| 168 scoped_ptr<FirefoxProfileLock> firefox_lock_; | 170 scoped_ptr<FirefoxProfileLock> firefox_lock_; |
| 169 | 171 |
| 170 DISALLOW_COPY_AND_ASSIGN(ImporterHost); | 172 DISALLOW_COPY_AND_ASSIGN(ImporterHost); |
| 171 }; | 173 }; |
| 172 | 174 |
| 173 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_HOST_H_ | 175 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_HOST_H_ |
| OLD | NEW |