OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/website_settings_info.h" | 5 #include "components/content_settings/core/browser/website_settings_info.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_registry.h" | |
11 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
12 #include "base/values.h" | 11 #include "base/values.h" |
13 #include "components/pref_registry/pref_registry_syncable.h" | 12 #include "components/pref_registry/pref_registry_syncable.h" |
| 13 #include "components/prefs/pref_registry.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const char kPrefPrefix[] = "profile.content_settings.exceptions."; | 17 const char kPrefPrefix[] = "profile.content_settings.exceptions."; |
18 const char kDefaultPrefPrefix[] = "profile.default_content_setting_values."; | 18 const char kDefaultPrefPrefix[] = "profile.default_content_setting_values."; |
19 | 19 |
20 std::string GetPrefName(const std::string& name, const char* prefix) { | 20 std::string GetPrefName(const std::string& name, const char* prefix) { |
21 std::string pref_name = name; | 21 std::string pref_name = name; |
22 base::ReplaceChars(pref_name, "-", "_", &pref_name); | 22 base::ReplaceChars(pref_name, "-", "_", &pref_name); |
23 return std::string(prefix).append(pref_name); | 23 return std::string(prefix).append(pref_name); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 if (sync_status_ == SYNCABLE) | 57 if (sync_status_ == SYNCABLE) |
58 flags |= user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; | 58 flags |= user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; |
59 | 59 |
60 if (lossy_status_ == LOSSY) | 60 if (lossy_status_ == LOSSY) |
61 flags |= PrefRegistry::LOSSY_PREF; | 61 flags |= PrefRegistry::LOSSY_PREF; |
62 | 62 |
63 return flags; | 63 return flags; |
64 } | 64 } |
65 | 65 |
66 } // namespace content_settings | 66 } // namespace content_settings |
OLD | NEW |