Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1088)

Unified Diff: chrome/browser/content_settings/host_content_settings_map.h

Issue 615083004: Use ThreadChecker rather than DCHECK_CURRENTLY_ON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698