diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 19:50:34 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 19:50:34 +0000 |
commit | 05a81418486624a13eb7961963fe5bb07ff03806 (patch) | |
tree | fc8f5ebd45addfca4f370238ff0cb0239e3005e6 /base | |
parent | 8a6e41619ddac0aa52625ff425b574142fd96ba1 (diff) | |
download | chromium_src-05a81418486624a13eb7961963fe5bb07ff03806.zip chromium_src-05a81418486624a13eb7961963fe5bb07ff03806.tar.gz chromium_src-05a81418486624a13eb7961963fe5bb07ff03806.tar.bz2 |
Fix DirectoryLister not to require refcounting.
Also prevent DirectoryLister from blocking the IO thread when cancelled (blocked on joining file IO thread).
Allows us to remove refcounting from URLRequestFileDirJob.
BUG=65331
TEST=Browse to file:/// and make sure it still works. Test cancellation by closing the tab.
Review URL: http://codereview.chromium.org/6898047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/i18n/file_util_icu.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/i18n/file_util_icu.cc b/base/i18n/file_util_icu.cc index 9d12097..0c7c09d 100644 --- a/base/i18n/file_util_icu.cc +++ b/base/i18n/file_util_icu.cc @@ -81,7 +81,8 @@ IllegalCharacters::IllegalCharacters() { class LocaleAwareComparator { public: static LocaleAwareComparator* GetInstance() { - return Singleton<LocaleAwareComparator>::get(); + return Singleton<LocaleAwareComparator, + LeakySingletonTraits<LocaleAwareComparator> >::get(); } // Note: A similar function is available in l10n_util. @@ -104,6 +105,8 @@ class LocaleAwareComparator { } private: + friend struct DefaultSingletonTraits<LocaleAwareComparator>; + LocaleAwareComparator() { UErrorCode error_code = U_ZERO_ERROR; // Use the default collator. The default locale should have been properly @@ -121,7 +124,6 @@ class LocaleAwareComparator { scoped_ptr<icu::Collator> collator_; base::Lock lock_; - friend struct DefaultSingletonTraits<LocaleAwareComparator>; DISALLOW_COPY_AND_ASSIGN(LocaleAwareComparator); }; |