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

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

Issue 7828022: Add a method to the HostContentSettings map to return the |Value| of a content setting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update example value of AutoSelectCertificate policy in policy_template.json Created 9 years, 3 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 cc7150a8edcc11c2810b1b09453a947586cbeced..a98e5946233b4141852eb1eda978585adf0313ab 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/basictypes.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
+#include "base/values.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/content_settings/content_settings_pattern.h"
#include "chrome/browser/content_settings/content_settings_observer.h"
@@ -69,7 +70,7 @@ class HostContentSettingsMap
// Returns a single ContentSetting which applies to the given URLs. Note that
// certain internal schemes are whitelisted. For ContentSettingsTypes that
- // require an resource identifier to be specified, the |resource_identifier|
+ // require a resource identifier to be specified, the |resource_identifier|
// must be non-empty.
//
// This may be called on any thread.
@@ -79,6 +80,19 @@ class HostContentSettingsMap
ContentSettingsType content_type,
const std::string& resource_identifier) const;
+ // Returns a content setting |Value| which applies to the given URLs. Note
+ // that certain internal schemes are whitelisted. For ContentSettingsTypes
+ // that require a resource identifier to be specified, the
+ // |resource_identifier| must be non-empty. Ownership of the returned |Value|
+ // is transfered to the caller.
+ //
+ // This may be called on any thread.
+ Value* GetContentSettingValue(
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType content_type,
+ const std::string& resource_identifier) const;
+
// Gets the content setting for cookies. This takes the third party cookie
// flag into account, and therefore needs to know whether we read or write a
// cookie.

Powered by Google App Engine
This is Rietveld 408576698