OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_content_settings_helpers.h" | 5 #include "chrome/browser/extensions/extension_content_settings_helpers.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 "chrome/common/extensions/url_pattern.h" | 10 #include "chrome/common/extensions/url_pattern.h" |
11 #include "content/common/url_constants.h" | 11 #include "content/public/common/url_constants.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", |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return false; | 138 return false; |
139 } | 139 } |
140 | 140 |
141 const char* ContentSettingToString(ContentSetting setting) { | 141 const char* ContentSettingToString(ContentSetting setting) { |
142 size_t index = static_cast<size_t>(setting); | 142 size_t index = static_cast<size_t>(setting); |
143 DCHECK_LT(index, arraysize(kContentSettingNames)); | 143 DCHECK_LT(index, arraysize(kContentSettingNames)); |
144 return kContentSettingNames[index]; | 144 return kContentSettingNames[index]; |
145 } | 145 } |
146 | 146 |
147 } // namespace extension_content_settings_helpers | 147 } // namespace extension_content_settings_helpers |
OLD | NEW |