diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 00:59:08 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 00:59:08 +0000 |
commit | ddeab8cb9bea22ce9fe0da2498433d722041dee3 (patch) | |
tree | 692ab9b68f53a2f8d8d81cef06165a0ffb17dd44 /chrome | |
parent | 491328e2de2e7b6b405943f676166e72b2a77784 (diff) | |
download | chromium_src-ddeab8cb9bea22ce9fe0da2498433d722041dee3.zip chromium_src-ddeab8cb9bea22ce9fe0da2498433d722041dee3.tar.gz chromium_src-ddeab8cb9bea22ce9fe0da2498433d722041dee3.tar.bz2 |
Made HostZoomMap be deleted on the UI thread
This fixes some DCHECKs in the themes sync integration tests.
Re-enable themes sync integration tests.
BUG=62779
TEST=themes sync integration tests
Review URL: http://codereview.chromium.org/4835001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/host_zoom_map.h | 12 | ||||
-rw-r--r-- | chrome/test/live_sync/single_client_live_themes_sync_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/live_sync/two_client_live_themes_sync_test.cc | 6 |
3 files changed, 13 insertions, 11 deletions
diff --git a/chrome/browser/host_zoom_map.h b/chrome/browser/host_zoom_map.h index 10f512e..6030f4c 100644 --- a/chrome/browser/host_zoom_map.h +++ b/chrome/browser/host_zoom_map.h @@ -16,6 +16,7 @@ #include "base/basictypes.h" #include "base/lock.h" #include "base/ref_counted.h" +#include "chrome/browser/browser_thread.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" @@ -24,8 +25,12 @@ class GURL; class PrefService; class Profile; -class HostZoomMap : public NotificationObserver, - public base::RefCountedThreadSafe<HostZoomMap> { +// HostZoomMap needs to be deleted on the UI thread because it listens +// to notifications on there (and holds a NotificationRegistrar). +class HostZoomMap : + public NotificationObserver, + public base::RefCountedThreadSafe<HostZoomMap, + BrowserThread::DeleteOnUIThread> { public: explicit HostZoomMap(Profile* profile); @@ -74,7 +79,8 @@ class HostZoomMap : public NotificationObserver, const NotificationDetails& details); private: - friend class base::RefCountedThreadSafe<HostZoomMap>; + friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; + friend class DeleteTask<HostZoomMap>; typedef std::map<std::string, double> HostZoomLevels; diff --git a/chrome/test/live_sync/single_client_live_themes_sync_test.cc b/chrome/test/live_sync/single_client_live_themes_sync_test.cc index 8642aca..f8cef03 100644 --- a/chrome/test/live_sync/single_client_live_themes_sync_test.cc +++ b/chrome/test/live_sync/single_client_live_themes_sync_test.cc @@ -39,8 +39,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, CustomTheme) { ASSERT_EQ(theme, GetCustomTheme(verifier())); } -// TODO(akalin): Re-enable this after http://crbug.com/62779 is fixed. -IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, FAILS_NativeTheme) { +IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, NativeTheme) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; scoped_refptr<Extension> theme = GetTheme(0); @@ -64,8 +63,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, FAILS_NativeTheme) { ASSERT_TRUE(UsingNativeTheme(verifier())); } -// TODO(akalin): Re-enable this after http://crbug.com/62779 is fixed. -IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, FAILS_DefaultTheme) { +IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, DefaultTheme) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; scoped_refptr<Extension> theme = GetTheme(0); diff --git a/chrome/test/live_sync/two_client_live_themes_sync_test.cc b/chrome/test/live_sync/two_client_live_themes_sync_test.cc index 57201c5..c9db7b9 100644 --- a/chrome/test/live_sync/two_client_live_themes_sync_test.cc +++ b/chrome/test/live_sync/two_client_live_themes_sync_test.cc @@ -44,8 +44,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveThemesSyncTest, CustomTheme) { ASSERT_EQ(theme, GetCustomTheme(verifier())); } -// TODO(akalin): Re-enable this after http://crbug.com/62779 is fixed. -IN_PROC_BROWSER_TEST_F(TwoClientLiveThemesSyncTest, FAILS_NativeTheme) { +IN_PROC_BROWSER_TEST_F(TwoClientLiveThemesSyncTest, NativeTheme) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; scoped_refptr<Extension> theme = GetTheme(0); @@ -68,8 +67,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveThemesSyncTest, FAILS_NativeTheme) { ASSERT_TRUE(UsingNativeTheme(verifier())); } -// TODO(akalin): Re-enable this after http://crbug.com/62779 is fixed. -IN_PROC_BROWSER_TEST_F(TwoClientLiveThemesSyncTest, FAILS_DefaultTheme) { +IN_PROC_BROWSER_TEST_F(TwoClientLiveThemesSyncTest, DefaultTheme) { ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; scoped_refptr<Extension> theme = GetTheme(0); |