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

Side by Side Diff: chrome/browser/content_settings/content_settings_utils.cc

Issue 27635002: Content settings for <audio> and <video>. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix. Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/content_settings/content_settings_utils.h" 5 #include "chrome/browser/content_settings/content_settings_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/content_settings/content_settings_provider.h" 15 #include "chrome/browser/content_settings/content_settings_provider.h"
16 #include "chrome/browser/content_settings/content_settings_rule.h" 16 #include "chrome/browser/content_settings/content_settings_rule.h"
17 #include "chrome/browser/content_settings/host_content_settings_map.h" 17 #include "chrome/browser/content_settings/host_content_settings_map.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/content_settings_pattern.h" 19 #include "chrome/common/content_settings_pattern.h"
20 #include "url/gurl.h" 20 #include "url/gurl.h"
21 21
22 namespace { 22 namespace {
23 23
24 // The names of the ContentSettingsType values, for use with dictionary prefs. 24 // The names of the ContentSettingsType values, for use with dictionary prefs.
25 const char* kTypeNames[] = { 25 const char* kTypeNames[] = {
26 "cookies", 26 "cookies",
27 "images", 27 "images",
28 "javascript", 28 "javascript",
29 "media",
29 "plugins", 30 "plugins",
30 "popups", 31 "popups",
31 "geolocation", 32 "geolocation",
32 "notifications", 33 "notifications",
33 "auto-select-certificate", 34 "auto-select-certificate",
34 "fullscreen", 35 "fullscreen",
35 "mouselock", 36 "mouselock",
36 "mixed-script", 37 "mixed-script",
37 "media-stream", 38 "media-stream",
38 "media-stream-mic", 39 "media-stream-mic",
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 content_type, resource_identifier, 195 content_type, resource_identifier,
195 include_incognito)); 196 include_incognito));
196 return ValueToContentSetting(value.get()); 197 return ValueToContentSetting(value.get());
197 } 198 }
198 199
199 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 200 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
200 RendererContentSettingRules* rules) { 201 RendererContentSettingRules* rules) {
201 map->GetSettingsForOneType( 202 map->GetSettingsForOneType(
202 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); 203 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules));
203 map->GetSettingsForOneType( 204 map->GetSettingsForOneType(
205 CONTENT_SETTINGS_TYPE_MEDIA, std::string(), &(rules->media_rules));
206 map->GetSettingsForOneType(
204 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); 207 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules));
205 } 208 }
206 209
207 } // namespace content_settings 210 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698