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

Side by Side Diff: components/content_settings/core/browser/content_settings_utils.h

Issue 1320673013: Remove HostContentSettingsMap::IsSettingAllowedForType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-issetting-allowed
Patch Set: Created 5 years, 2 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 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 private: 48 private:
49 IteratorType iterator_; 49 IteratorType iterator_;
50 }; 50 };
51 51
52 // These constants are copied from extensions/common/extension_constants.h and 52 // These constants are copied from extensions/common/extension_constants.h and
53 // content/public/common/url_constants.h to avoid complicated dependencies. 53 // content/public/common/url_constants.h to avoid complicated dependencies.
54 // TODO(vabr): Get these constants through the ContentSettingsClient. 54 // TODO(vabr): Get these constants through the ContentSettingsClient.
55 const char kChromeDevToolsScheme[] = "chrome-devtools"; 55 const char kChromeDevToolsScheme[] = "chrome-devtools";
56 const char kChromeUIScheme[] = "chrome"; 56 const char kChromeUIScheme[] = "chrome";
57
58 #if defined(ENABLE_EXTENSIONS)
59 const char kExtensionScheme[] = "chrome-extension"; 57 const char kExtensionScheme[] = "chrome-extension";
60 #endif
61 58
62 std::string ContentSettingToString(ContentSetting setting); 59 std::string ContentSettingToString(ContentSetting setting);
63 60
64 // Converts a content setting string to the corresponding ContentSetting. 61 // Converts a content setting string to the corresponding ContentSetting.
65 // Returns true if |name| specifies a valid content setting, false otherwise. 62 // Returns true if |name| specifies a valid content setting, false otherwise.
66 bool ContentSettingFromString(const std::string& name, ContentSetting* setting); 63 bool ContentSettingFromString(const std::string& name, ContentSetting* setting);
67 64
68 // Converts |Value| to |ContentSetting|. 65 // Converts |Value| to |ContentSetting|.
69 ContentSetting ValueToContentSetting(const base::Value* value); 66 ContentSetting ValueToContentSetting(const base::Value* value);
70 67
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 ContentSettingsPattern* secondary_pattern); 100 ContentSettingsPattern* secondary_pattern);
104 101
105 // Populates |rules| with content setting rules for content types that are 102 // Populates |rules| with content setting rules for content types that are
106 // handled by the renderer. 103 // handled by the renderer.
107 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 104 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
108 RendererContentSettingRules* rules); 105 RendererContentSettingRules* rules);
109 106
110 } // namespace content_settings 107 } // namespace content_settings
111 108
112 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 109 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698