Chromium Code Reviews| 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_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_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" |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 public importer::ImporterListObserver, | 24 public importer::ImporterListObserver, |
| 25 public importer::ImporterProgressObserver { | 25 public importer::ImporterProgressObserver { |
| 26 public: | 26 public: |
| 27 ImportDataHandler(); | 27 ImportDataHandler(); |
| 28 virtual ~ImportDataHandler(); | 28 virtual ~ImportDataHandler(); |
| 29 | 29 |
| 30 // OptionsPageUIHandler: | 30 // OptionsPageUIHandler: |
| 31 virtual void GetLocalizedValues( | 31 virtual void GetLocalizedValues( |
| 32 base::DictionaryValue* localized_strings) OVERRIDE; | 32 base::DictionaryValue* localized_strings) OVERRIDE; |
| 33 virtual void Initialize() OVERRIDE; | 33 virtual void Initialize() OVERRIDE; |
| 34 virtual void SendPageValues() OVERRIDE; | |
| 34 | 35 |
| 35 // WebUIMessageHandler: | 36 // WebUIMessageHandler: |
| 36 virtual void RegisterMessages() OVERRIDE; | 37 virtual void RegisterMessages() OVERRIDE; |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 void ImportData(const base::ListValue* args); | 40 void ImportData(const base::ListValue* args); |
| 40 | 41 |
| 41 // importer::ImporterListObserver: | 42 // importer::ImporterListObserver: |
| 42 virtual void OnSourceProfilesLoaded() OVERRIDE; | 43 virtual void OnSourceProfilesLoaded() OVERRIDE; |
| 43 | 44 |
| 44 // importer::ImporterProgressObserver: | 45 // importer::ImporterProgressObserver: |
| 45 virtual void ImportStarted() OVERRIDE; | 46 virtual void ImportStarted() OVERRIDE; |
| 46 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; | 47 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; |
| 47 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; | 48 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; |
| 48 virtual void ImportEnded() OVERRIDE; | 49 virtual void ImportEnded() OVERRIDE; |
| 49 | 50 |
| 50 scoped_refptr<ImporterList> importer_list_; | 51 scoped_refptr<ImporterList> importer_list_; |
| 51 | 52 |
| 52 // If non-null it means importing is in progress. ImporterHost takes care | 53 // If non-null it means importing is in progress. ImporterHost takes care |
| 53 // of deleting itself when import is complete. | 54 // of deleting itself when import is complete. |
| 54 ImporterHost* importer_host_; // weak | 55 ImporterHost* importer_host_; // weak |
| 55 | 56 |
| 56 bool import_did_succeed_; | 57 bool import_did_succeed_; |
| 58 bool profiles_loaded_; | |
|
Evan Stade
2012/03/13 20:44:50
rather than adding this, expose source_profiles_lo
Dan Beam
2012/03/13 23:01:45
Done.
| |
| 57 | 59 |
| 58 DISALLOW_COPY_AND_ASSIGN(ImportDataHandler); | 60 DISALLOW_COPY_AND_ASSIGN(ImportDataHandler); |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace options2 | 63 } // namespace options2 |
| 62 | 64 |
| 63 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ | 65 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ |
| OLD | NEW |