diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 20:16:44 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 20:16:44 +0000 |
commit | 6c0570addc47619e705239de27c9a6f260fcdb1c (patch) | |
tree | b5227e4ad2778c929ba7640cfcad8063972f1eea /chrome/profile_import | |
parent | ae6cb3026ab95305fe49d512a03718792db9e9ab (diff) | |
download | chromium_src-6c0570addc47619e705239de27c9a6f260fcdb1c.zip chromium_src-6c0570addc47619e705239de27c9a6f260fcdb1c.tar.gz chromium_src-6c0570addc47619e705239de27c9a6f260fcdb1c.tar.bz2 |
importer: Refactor ImporterList so it doesn't have to know about Importer.
- Move CreateImporterByType to importer_type.h
- Rename ProfileType to ImporterType to clarify its usage.
- Rename the variable names used for ProfileType from browser_type to
importer_type as we support importing from more than just browsers.
- Cleanup a few comments.
- Remove unneed importer_list.h includes.
- This also makes the ImporterHost not to know about ImporterList.
BUG=None
TEST=None
R=avi@chromium.org
Review URL: http://codereview.chromium.org/6693056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/profile_import')
-rw-r--r-- | chrome/profile_import/profile_import_thread.cc | 7 | ||||
-rw-r--r-- | chrome/profile_import/profile_import_thread.h | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/chrome/profile_import/profile_import_thread.cc b/chrome/profile_import/profile_import_thread.cc index 30772fd..d54247a 100644 --- a/chrome/profile_import/profile_import_thread.cc +++ b/chrome/profile_import/profile_import_thread.cc @@ -12,7 +12,7 @@ #include "base/values.h" #include "chrome/browser/importer/external_process_importer_bridge.h" #include "chrome/browser/importer/importer.h" -#include "chrome/browser/importer/importer_list.h" +#include "chrome/browser/importer/importer_type.h" #include "chrome/browser/importer/profile_import_process_messages.h" #include "chrome/browser/search_engines/template_url.h" #include "content/common/child_process.h" @@ -30,7 +30,6 @@ const int kNumFaviconsToSend = 100; ProfileImportThread::ProfileImportThread() : bridge_(NULL), - browser_type_(0), items_to_import_(0), importer_(NULL) { ChildProcess::current()->AddRefProcess(); // Balanced in Cleanup(). @@ -58,9 +57,7 @@ void ProfileImportThread::OnImportStart( const DictionaryValue& localized_strings, bool import_to_bookmark_bar) { bridge_ = new ExternalProcessImporterBridge(this, localized_strings); - - scoped_refptr<ImporterList> importer_list(new ImporterList); - importer_ = importer_list->CreateImporterByType(profile_info.browser_type); + importer_ = importer::CreateImporterByType(profile_info.importer_type); if (!importer_) { Send(new ProfileImportProcessHostMsg_Import_Finished(false, "Importer could not be created.")); diff --git a/chrome/profile_import/profile_import_thread.h b/chrome/profile_import/profile_import_thread.h index 726c6f1..62a098d 100644 --- a/chrome/profile_import/profile_import_thread.h +++ b/chrome/profile_import/profile_import_thread.h @@ -97,10 +97,6 @@ class ProfileImportThread : public ChildThread { // directly back to the ProfileImportProcessHost. scoped_refptr<ExternalProcessImporterBridge> bridge_; - // importer::ProfileType enum from importer_list, stored in ProfileInfo - // struct in importer. - int browser_type_; - // A bitmask of importer::ImportItem. uint16 items_to_import_; |