summaryrefslogtreecommitdiffstats
path: root/chrome/common/content_settings.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-19 01:52:45 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-19 01:52:45 +0000
commitaee541ebc97e1ff2c8bb43e4375913f582931d40 (patch)
tree49e6735353739bef26d1e960738470247ffa0dc8 /chrome/common/content_settings.cc
parent470ad82d83b7773ed5c791a1f3b612087b980eee (diff)
downloadchromium_src-aee541ebc97e1ff2c8bb43e4375913f582931d40.zip
chromium_src-aee541ebc97e1ff2c8bb43e4375913f582931d40.tar.gz
chromium_src-aee541ebc97e1ff2c8bb43e4375913f582931d40.tar.bz2
Add GeolocationContentSettingsMap, a geolocation-specific variant of HostContentSettingsMap.
This was originally written by bulach and posted at http://codereview.chromium.org/1033004 ; modified and landed by me. BUG=37206 TEST=Tested by unittests TBR=bulach,joth Review URL: http://codereview.chromium.org/1084005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/content_settings.cc')
-rw-r--r--chrome/common/content_settings.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/common/content_settings.cc b/chrome/common/content_settings.cc
new file mode 100644
index 0000000..89eaa59
--- /dev/null
+++ b/chrome/common/content_settings.cc
@@ -0,0 +1,11 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/content_settings.h"
+
+ContentSetting IntToContentSetting(int content_setting) {
+ return ((content_setting < 0) ||
+ (content_setting >= CONTENT_SETTING_NUM_SETTINGS)) ?
+ CONTENT_SETTING_DEFAULT : static_cast<ContentSetting>(content_setting);
+}