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

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

Issue 7885006: Moving ContentSettingsPattern from chrome/browser/content_settings to chrome/common. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/content_settings/content_settings_pattern.h"
14 #include "chrome/common/content_settings.h" 13 #include "chrome/common/content_settings.h"
14 #include "chrome/common/content_settings_pattern.h"
15 #include "chrome/common/content_settings_types.h" 15 #include "chrome/common/content_settings_types.h"
16 16
17 namespace content_settings { 17 namespace content_settings {
18 18
19 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; 19 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair;
20 20
21 // Returns true if the |content_type| requires a resource identifier. 21 // Returns true if the |content_type| requires a resource identifier.
22 bool RequiresResourceIdentifier(ContentSettingsType content_type); 22 bool RequiresResourceIdentifier(ContentSettingsType content_type);
23 23
24 // Maps CONTENT_SETTING_ASK for the CONTENT_SETTINGS_TYPE_PLUGINS to 24 // Maps CONTENT_SETTING_ASK for the CONTENT_SETTINGS_TYPE_PLUGINS to
25 // CONTENT_SETTING_BLOCK if click-to-play is not enabled. 25 // CONTENT_SETTING_BLOCK if click-to-play is not enabled.
26 ContentSetting ClickToPlayFixup(ContentSettingsType content_type, 26 ContentSetting ClickToPlayFixup(ContentSettingsType content_type,
27 ContentSetting setting); 27 ContentSetting setting);
28 28
29 // Converts |Value| to |ContentSetting|. 29 // Converts |Value| to |ContentSetting|.
30 ContentSetting ValueToContentSetting(Value* value); 30 ContentSetting ValueToContentSetting(Value* value);
31 31
32 PatternPair ParsePatternString(const std::string& pattern_str); 32 PatternPair ParsePatternString(const std::string& pattern_str);
33 33
34 std::string CreatePatternString( 34 std::string CreatePatternString(
35 const ContentSettingsPattern& item_pattern, 35 const ContentSettingsPattern& item_pattern,
36 const ContentSettingsPattern& top_level_frame_pattern); 36 const ContentSettingsPattern& top_level_frame_pattern);
37 37
38 } // namespace content_settings 38 } // namespace content_settings
39 39
40 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 40 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698