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

Unified Diff: chrome/browser/content_settings/content_settings_default_provider.cc

Issue 615083004: Use ThreadChecker rather than DCHECK_CURRENTLY_ON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK testing_profile 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_default_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/content_settings_default_provider.cc
diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc
index d615b77812a5d0379b61ca44982f70f7140636c1..4dc313dfe07ac219364c1dd588d2171f2a270092 100644
--- a/chrome/browser/content_settings/content_settings_default_provider.cc
+++ b/chrome/browser/content_settings/content_settings_default_provider.cc
@@ -20,11 +20,8 @@
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/pref_registry/pref_registry_syncable.h"
-#include "content/public/browser/browser_thread.h"
#include "url/gurl.h"
-using content::BrowserThread;
-
namespace {
// The default setting for each content type.
@@ -185,7 +182,7 @@ bool DefaultProvider::SetWebsiteSetting(
ContentSettingsType content_type,
const ResourceIdentifier& resource_identifier,
base::Value* in_value) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(CalledOnValidThread());
DCHECK(prefs_);
// Ignore non default settings
@@ -264,7 +261,7 @@ void DefaultProvider::ClearAllContentSettingsRules(
}
void DefaultProvider::ShutdownOnUIThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(CalledOnValidThread());
DCHECK(prefs_);
RemoveAllObservers();
pref_change_registrar_.RemoveAll();
@@ -272,7 +269,7 @@ void DefaultProvider::ShutdownOnUIThread() {
}
void DefaultProvider::OnPreferenceChanged(const std::string& name) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(CalledOnValidThread());
if (updating_preferences_)
return;
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_default_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698