diff options
author | jhawkins@google.com <jhawkins@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 01:49:53 +0000 |
---|---|---|
committer | jhawkins@google.com <jhawkins@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 01:49:53 +0000 |
commit | f078edace3c34929fefcbec8115ae9faf20cf0b4 (patch) | |
tree | b2ac9bcc53047ad60992a58a3aa4f4094eef4ef0 /chrome/browser/importer | |
parent | 50b722ccbcd5e018936b6aefadbcf2a131056886 (diff) | |
download | chromium_src-f078edace3c34929fefcbec8115ae9faf20cf0b4.zip chromium_src-f078edace3c34929fefcbec8115ae9faf20cf0b4.tar.gz chromium_src-f078edace3c34929fefcbec8115ae9faf20cf0b4.tar.bz2 |
Views: Implement the ImporterList::Observer in ImporterView to enable the
correct asynchronous version of Importer.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5873005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/importer.h | 5 | ||||
-rw-r--r-- | chrome/browser/importer/importer_list.cc | 7 | ||||
-rw-r--r-- | chrome/browser/importer/importer_list.h | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h index bc25850..e994036 100644 --- a/chrome/browser/importer/importer.h +++ b/chrome/browser/importer/importer.h @@ -184,6 +184,11 @@ class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>, return importer_list_->GetSourceProfileInfoForBrowserType(browser_type); } + // Returns true if the source profiles have been loaded. + bool source_profiles_loaded() const { + return importer_list_->source_profiles_loaded(); + } + protected: friend class base::RefCountedThreadSafe<ImporterHost>; diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc index e38cc5e..10e1101 100644 --- a/chrome/browser/importer/importer_list.cc +++ b/chrome/browser/importer/importer_list.cc @@ -98,7 +98,8 @@ void DetectFirefoxProfiles(std::vector<importer::ProfileInfo*>* profiles) { profiles->push_back(firefox); } -void DetectGoogleToolbarProfiles(std::vector<importer::ProfileInfo*>* profiles) { +void DetectGoogleToolbarProfiles( + std::vector<importer::ProfileInfo*>* profiles) { if (FirstRun::IsChromeFirstRun()) return; @@ -196,6 +197,10 @@ const importer::ProfileInfo& ImporterList::GetSourceProfileInfoForBrowserType( return *(new importer::ProfileInfo()); } +bool ImporterList::source_profiles_loaded() const { + return source_profiles_loaded_; +} + void ImporterList::DetectSourceProfilesWorker() { // TODO(jhawkins): Remove this condition once DetectSourceProfileHack is // removed. |observer_| is NULL when said method is called. diff --git a/chrome/browser/importer/importer_list.h b/chrome/browser/importer/importer_list.h index fc801fc..f3db148 100644 --- a/chrome/browser/importer/importer_list.h +++ b/chrome/browser/importer/importer_list.h @@ -61,6 +61,9 @@ class ImporterList : public base::RefCountedThreadSafe<ImporterList> { const importer::ProfileInfo& GetSourceProfileInfoForBrowserType( int browser_type) const; + // Returns true if the source profiles have been loaded. + bool source_profiles_loaded() const; + private: friend class base::RefCountedThreadSafe<ImporterList>; |