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

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

Issue 8539004: Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto origin/trunk Created 9 years, 1 month 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.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.h
diff --git a/chrome/browser/content_settings/content_settings_default_provider.h b/chrome/browser/content_settings/content_settings_default_provider.h
index f9ddaffd135305d8cb0578de04b18f9d8e66b3e9..94d92525d80dbd3eeae0c8c7938eb59c48085375 100644
--- a/chrome/browser/content_settings/content_settings_default_provider.h
+++ b/chrome/browser/content_settings/content_settings_default_provider.h
@@ -5,10 +5,12 @@
#ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_
#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DEFAULT_PROVIDER_H_
+#include <map>
#include <string>
#include <vector>
#include "base/basictypes.h"
+#include "base/memory/linked_ptr.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/content_settings/content_settings_observable_provider.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
@@ -37,12 +39,12 @@ class DefaultProvider : public ObservableProvider,
const ResourceIdentifier& resource_identifier,
bool incognito) const OVERRIDE;
- virtual void SetContentSetting(
+ virtual bool SetWebsiteSetting(
const ContentSettingsPattern& primary_pattern,
const ContentSettingsPattern& secondary_pattern,
ContentSettingsType content_type,
const ResourceIdentifier& resource_identifier,
- ContentSetting content_setting) OVERRIDE;
+ Value* value) OVERRIDE;
virtual void ClearAllContentSettingsRules(
ContentSettingsType content_type) OVERRIDE;
@@ -56,8 +58,7 @@ class DefaultProvider : public ObservableProvider,
private:
// Sets the fields of |settings| based on the values in |dictionary|.
- void GetSettingsFromDictionary(const base::DictionaryValue* dictionary,
- ContentSetting* settings);
+ void GetSettingsFromDictionary(const base::DictionaryValue* dictionary);
// Forces the default settings to be explicitly set instead of themselves
// being CONTENT_SETTING_DEFAULT.
@@ -70,8 +71,10 @@ class DefaultProvider : public ObservableProvider,
void MigrateObsoleteNotificationPref();
void MigrateObsoleteGeolocationPref();
+ typedef linked_ptr<base::Value> ValuePtr;
+ typedef std::map<ContentSettingsType, ValuePtr> ValueMap;
// Copies of the pref data, so that we can read it on the IO thread.
- ContentSetting default_content_settings_[CONTENT_SETTINGS_NUM_TYPES];
+ ValueMap default_settings_;
PrefService* prefs_;
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_default_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698