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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PATTERN_PARSER_H_ | 5 #ifndef CHROME_COMMON_CONTENT_SETTINGS_PATTERN_PARSER_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PATTERN_PARSER_H_ | 6 #define CHROME_COMMON_CONTENT_SETTINGS_PATTERN_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "chrome/browser/content_settings/content_settings_pattern.h" | 11 #include "chrome/common/content_settings_pattern.h" |
12 | 12 |
13 namespace content_settings { | 13 namespace content_settings { |
14 | 14 |
15 struct PatternParts; | 15 struct PatternParts; |
16 | 16 |
17 class PatternParser { | 17 class PatternParser { |
18 public: | 18 public: |
19 static void Parse(const std::string& pattern_spec, | 19 static void Parse(const std::string& pattern_spec, |
20 ContentSettingsPattern::BuilderInterface* builder); | 20 ContentSettingsPattern::BuilderInterface* builder); |
21 | 21 |
22 static std::string ToString( | 22 static std::string ToString( |
23 const ContentSettingsPattern::PatternParts& parts); | 23 const ContentSettingsPattern::PatternParts& parts); |
24 | 24 |
25 private: | 25 private: |
26 static const char* kDomainWildcard; | 26 static const char* kDomainWildcard; |
27 | 27 |
28 static const size_t kDomainWildcardLength; | 28 static const size_t kDomainWildcardLength; |
29 | 29 |
30 static const char* kSchemeWildcard; | 30 static const char* kSchemeWildcard; |
31 | 31 |
32 static const char* kHostWildcard; | 32 static const char* kHostWildcard; |
33 | 33 |
34 static const char* kPortWildcard; | 34 static const char* kPortWildcard; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(PatternParser); | 36 DISALLOW_COPY_AND_ASSIGN(PatternParser); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace content_settings | 39 } // namespace content_settings |
40 | 40 |
41 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PATTERN_PARSER_H_ | 41 #endif // CHROME_COMMON_CONTENT_SETTINGS_PATTERN_PARSER_H_ |
OLD | NEW |