diff options
author | haraken@google.com <haraken@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-15 15:18:12 +0000 |
---|---|---|
committer | haraken@google.com <haraken@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-15 15:18:12 +0000 |
commit | 4caa4cfbfa81bad1620354134766fb93c7670674 (patch) | |
tree | ad9667ffbeb7e271db2d0304a112689d131faa9b /chrome/browser/importer/importer_host.cc | |
parent | 721fa4c2f13b349baeb1929128e3643218860d6b (diff) | |
download | chromium_src-4caa4cfbfa81bad1620354134766fb93c7670674.zip chromium_src-4caa4cfbfa81bad1620354134766fb93c7670674.tar.gz chromium_src-4caa4cfbfa81bad1620354134766fb93c7670674.tar.bz2 |
Make sure to pass non-null Profile object to ImporterHost::StartImportSettings
BUG=17322
TEST=ImporterTest.*
Review URL: http://codereview.chromium.org/7155018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/importer_host.cc')
-rw-r--r-- | chrome/browser/importer/importer_host.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/importer/importer_host.cc b/chrome/browser/importer/importer_host.cc index 04e19a9..07a8166 100644 --- a/chrome/browser/importer/importer_host.cc +++ b/chrome/browser/importer/importer_host.cc @@ -104,6 +104,7 @@ void ImporterHost::StartImportSettings( bool first_run) { // We really only support importing from one host at a time. DCHECK(!profile_); + DCHECK(target_profile); profile_ = target_profile; // Preserves the observer and creates a task, since we do async import so that @@ -165,8 +166,7 @@ ImporterHost::~ImporterHost() { importer_->Release(); if (installed_bookmark_observer_) { - DCHECK(profile_); // Only way for waiting_for_bookmarkbar_model_ to be true - // is if we have a profile. + DCHECK(profile_); profile_->GetBookmarkModel()->RemoveObserver(this); } } @@ -189,6 +189,9 @@ void ImporterHost::CheckForFirefoxLock( } void ImporterHost::CheckForLoadedModels(uint16 items) { + // A target profile must be loaded by StartImportSettings(). + DCHECK(profile_); + // BookmarkModel should be loaded before adding IE favorites. So we observe // the BookmarkModel if needed, and start the task after it has been loaded. if ((items & importer::FAVORITES) && !writer_->BookmarkModelIsLoaded()) { |