OLD | NEW |
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 "components/content_settings/core/browser/host_content_settings_map.h" | 5 #include "components/content_settings/core/browser/host_content_settings_map.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/prefs/pref_service.h" |
13 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
16 #include "base/time/clock.h" | 17 #include "base/time/clock.h" |
17 #include "build/build_config.h" | 18 #include "build/build_config.h" |
18 #include "components/content_settings/core/browser/content_settings_default_prov
ider.h" | 19 #include "components/content_settings/core/browser/content_settings_default_prov
ider.h" |
19 #include "components/content_settings/core/browser/content_settings_details.h" | 20 #include "components/content_settings/core/browser/content_settings_details.h" |
20 #include "components/content_settings/core/browser/content_settings_info.h" | 21 #include "components/content_settings/core/browser/content_settings_info.h" |
21 #include "components/content_settings/core/browser/content_settings_observable_p
rovider.h" | 22 #include "components/content_settings/core/browser/content_settings_observable_p
rovider.h" |
22 #include "components/content_settings/core/browser/content_settings_policy_provi
der.h" | 23 #include "components/content_settings/core/browser/content_settings_policy_provi
der.h" |
23 #include "components/content_settings/core/browser/content_settings_pref_provide
r.h" | 24 #include "components/content_settings/core/browser/content_settings_pref_provide
r.h" |
24 #include "components/content_settings/core/browser/content_settings_provider.h" | 25 #include "components/content_settings/core/browser/content_settings_provider.h" |
25 #include "components/content_settings/core/browser/content_settings_registry.h" | 26 #include "components/content_settings/core/browser/content_settings_registry.h" |
26 #include "components/content_settings/core/browser/content_settings_rule.h" | 27 #include "components/content_settings/core/browser/content_settings_rule.h" |
27 #include "components/content_settings/core/browser/content_settings_utils.h" | 28 #include "components/content_settings/core/browser/content_settings_utils.h" |
28 #include "components/content_settings/core/browser/website_settings_registry.h" | 29 #include "components/content_settings/core/browser/website_settings_registry.h" |
29 #include "components/content_settings/core/common/content_settings_pattern.h" | 30 #include "components/content_settings/core/common/content_settings_pattern.h" |
30 #include "components/content_settings/core/common/pref_names.h" | 31 #include "components/content_settings/core/common/pref_names.h" |
31 #include "components/pref_registry/pref_registry_syncable.h" | 32 #include "components/pref_registry/pref_registry_syncable.h" |
32 #include "components/prefs/pref_service.h" | |
33 #include "net/base/net_errors.h" | 33 #include "net/base/net_errors.h" |
34 #include "net/base/static_cookie_policy.h" | 34 #include "net/base/static_cookie_policy.h" |
35 #include "url/gurl.h" | 35 #include "url/gurl.h" |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 typedef std::vector<content_settings::Rule> Rules; | 39 typedef std::vector<content_settings::Rule> Rules; |
40 | 40 |
41 typedef std::pair<std::string, std::string> StringPair; | 41 typedef std::pair<std::string, std::string> StringPair; |
42 | 42 |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 rule.secondary_pattern.Matches(secondary_url)) { | 753 rule.secondary_pattern.Matches(secondary_url)) { |
754 if (primary_pattern) | 754 if (primary_pattern) |
755 *primary_pattern = rule.primary_pattern; | 755 *primary_pattern = rule.primary_pattern; |
756 if (secondary_pattern) | 756 if (secondary_pattern) |
757 *secondary_pattern = rule.secondary_pattern; | 757 *secondary_pattern = rule.secondary_pattern; |
758 return make_scoped_ptr(rule.value.get()->DeepCopy()); | 758 return make_scoped_ptr(rule.value.get()->DeepCopy()); |
759 } | 759 } |
760 } | 760 } |
761 return scoped_ptr<base::Value>(); | 761 return scoped_ptr<base::Value>(); |
762 } | 762 } |
OLD | NEW |