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

Side by Side Diff: chrome/browser/extensions/api/content_settings/content_settings_helpers.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/extensions/api/content_settings/content_settings_helper s.h" 5 #include "chrome/browser/extensions/api/content_settings/content_settings_helper s.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/common/url_constants.h" 10 #include "content/public/common/url_constants.h"
11 #include "extensions/common/url_pattern.h" 11 #include "extensions/common/url_pattern.h"
12 12
13 namespace { 13 namespace {
14 14
15 const char kNoPathWildcardsError[] = 15 const char kNoPathWildcardsError[] =
16 "Path wildcards in file URL patterns are not allowed."; 16 "Path wildcards in file URL patterns are not allowed.";
17 const char kNoPathsError[] = "Specific paths are not allowed."; 17 const char kNoPathsError[] = "Specific paths are not allowed.";
18 const char kInvalidPatternError[] = "The pattern \"*\" is invalid."; 18 const char kInvalidPatternError[] = "The pattern \"*\" is invalid.";
19 19
20 const char* const kContentSettingsTypeNames[] = { 20 const char* const kContentSettingsTypeNames[] = {
21 "cookies", 21 "cookies",
22 "images", 22 "images",
23 "javascript", 23 "javascript",
24 "media",
24 "plugins", 25 "plugins",
25 "popups", 26 "popups",
26 "location", 27 "location",
27 "notifications", 28 "notifications",
28 }; 29 };
29 COMPILE_ASSERT(arraysize(kContentSettingsTypeNames) <= 30 COMPILE_ASSERT(arraysize(kContentSettingsTypeNames) <=
30 CONTENT_SETTINGS_NUM_TYPES, 31 CONTENT_SETTINGS_NUM_TYPES,
31 content_settings_type_names_size_invalid); 32 content_settings_type_names_size_invalid);
32 33
33 const char* const kContentSettingNames[] = { 34 const char* const kContentSettingNames[] = {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 141 }
141 142
142 const char* ContentSettingToString(ContentSetting setting) { 143 const char* ContentSettingToString(ContentSetting setting) {
143 size_t index = static_cast<size_t>(setting); 144 size_t index = static_cast<size_t>(setting);
144 DCHECK_LT(index, arraysize(kContentSettingNames)); 145 DCHECK_LT(index, arraysize(kContentSettingNames));
145 return kContentSettingNames[index]; 146 return kContentSettingNames[index];
146 } 147 }
147 148
148 } // namespace content_settings_helpers 149 } // namespace content_settings_helpers
149 } // namespace extensions 150 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698