Index: chrome/browser/content_settings/content_settings_pref_provider.cc |
diff --git a/chrome/browser/content_settings/content_settings_pref_provider.cc b/chrome/browser/content_settings/content_settings_pref_provider.cc |
index c0a67216ab89c953da273a45d060dae73ae31d43..0cc08576a1f84829a490c169029bbda1b5c079aa 100644 |
--- a/chrome/browser/content_settings/content_settings_pref_provider.cc |
+++ b/chrome/browser/content_settings/content_settings_pref_provider.cc |
@@ -9,6 +9,7 @@ |
#include <utility> |
#include "base/auto_reset.h" |
+#include "base/bind.h" |
#include "base/command_line.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/metrics/histogram.h" |
@@ -25,13 +26,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 "content/public/browser/user_metrics.h" |
#include "url/gurl.h" |
-using base::UserMetricsAction; |
-using content::BrowserThread; |
- |
namespace { |
typedef std::pair<std::string, std::string> StringPair; |
@@ -126,7 +122,7 @@ bool PrefProvider::SetWebsiteSetting( |
ContentSettingsType content_type, |
const ResourceIdentifier& resource_identifier, |
base::Value* in_value) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(CalledOnValidThread()); |
Bernhard Bauer
2014/09/23 10:08:19
Hm... I'm not sure if I actually prefer this. Pref
Jun Mukai
2014/09/23 20:48:44
Hmm. As I wrote in another comment, my motivation
|
DCHECK(prefs_); |
// Default settings are set using a wildcard pattern for both |
// |primary_pattern| and |secondary_pattern|. Don't store default settings in |
@@ -180,7 +176,7 @@ bool PrefProvider::SetWebsiteSetting( |
void PrefProvider::ClearAllContentSettingsRules( |
ContentSettingsType content_type) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(CalledOnValidThread()); |
DCHECK(prefs_); |
OriginIdentifierValueMap* map_to_modify = &incognito_value_map_; |
@@ -491,7 +487,7 @@ void PrefProvider::ReadContentSettingsFromPref(bool overwrite) { |
} |
void PrefProvider::OnContentSettingsPatternPairsChanged() { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(CalledOnValidThread()); |
if (updating_preferences_) |
return; |
@@ -561,7 +557,7 @@ void PrefProvider::CanonicalizeContentSettingsExceptions( |
} |
void PrefProvider::ShutdownOnUIThread() { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(CalledOnValidThread()); |
DCHECK(prefs_); |
RemoveAllObservers(); |
pref_change_registrar_.RemoveAll(); |