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

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

Issue 7218073: Explicitly ShutdownOnUIThread the HostContentSettingsMap when destroying the Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 5 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 63f59b092419bfb2e5d112d413c2511807179556..4ec0846c84341d95c46707160368be58aa5a162f 100644
--- a/chrome/browser/content_settings/host_content_settings_map.h
+++ b/chrome/browser/content_settings/host_content_settings_map.h
@@ -32,20 +32,22 @@ class ProviderInterface;
class ContentSettingsDetails;
class DictionaryValue;
+class ExtensionService;
class GURL;
class PrefService;
class Profile;
class HostContentSettingsMap
: public NotificationObserver,
- public base::RefCountedThreadSafe<HostContentSettingsMap,
- BrowserThread::DeleteOnUIThread> {
+ public base::RefCountedThreadSafe<HostContentSettingsMap> {
public:
typedef Tuple3<ContentSettingsPattern, ContentSetting, std::string>
PatternSettingSourceTriple;
typedef std::vector<PatternSettingSourceTriple> SettingsForOneType;
- explicit HostContentSettingsMap(Profile* profile);
+ HostContentSettingsMap(PrefService* prefs,
+ ExtensionService* extension_service,
+ bool incognito);
static void RegisterUserPrefs(PrefService* prefs);
@@ -194,8 +196,7 @@ class HostContentSettingsMap
const NotificationDetails& details);
private:
- friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
- friend class DeleteTask<HostContentSettingsMap>;
+ friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
virtual ~HostContentSettingsMap();
@@ -205,16 +206,13 @@ class HostContentSettingsMap
ContentSettingsType content_type,
const std::string& resource_identifier) const;
- void UnregisterObservers();
-
// Various migration methods (old cookie, popup and per-host data gets
// migrated to the new format).
- void MigrateObsoleteCookiePref(PrefService* prefs);
+ void MigrateObsoleteCookiePref();
- // The profile we're associated with.
- Profile* profile_;
+ // Weak; owned by the Profile.
+ PrefService* prefs_;
- NotificationRegistrar notification_registrar_;
PrefChangeRegistrar pref_change_registrar_;
// Whether this settings map is for an OTR session.

Powered by Google App Engine
This is Rietveld 408576698