Index: chrome/browser/content_settings/host_content_settings_map.h |
diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h |
index 9316b6f07c657aff4dc06f5df8011ee27cf68660..d6aa51834dea8c6a989e12c2728c079fa409dcae 100644 |
--- a/chrome/browser/content_settings/host_content_settings_map.h |
+++ b/chrome/browser/content_settings/host_content_settings_map.h |
@@ -17,6 +17,7 @@ |
#include "base/observer_list.h" |
#include "base/prefs/pref_change_registrar.h" |
#include "base/threading/platform_thread.h" |
+#include "base/threading/thread_checker.h" |
#include "base/tuple.h" |
#include "chrome/browser/content_settings/content_settings_override_provider.h" |
#include "components/content_settings/core/browser/content_settings_observer.h" |
@@ -61,6 +62,8 @@ class HostContentSettingsMap |
NUM_PROVIDER_TYPES, |
}; |
+ // This should be called on the UI thread, otherwise |thread_checker_| handles |
+ // CalledOnValidThread() wrongly. |
HostContentSettingsMap(PrefService* prefs, bool incognito); |
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
@@ -354,6 +357,8 @@ class HostContentSettingsMap |
// before any other uses of it. |
ProviderMap content_settings_providers_; |
+ base::ThreadChecker thread_checker_; |
+ |
ObserverList<content_settings::Observer> observers_; |
DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |