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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/prefs/pref_registry.h" | 8 #include "base/prefs/pref_registry.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 scoping_type_(scoping_type) { | 42 scoping_type_(scoping_type) { |
43 // For legacy reasons the default value is currently restricted to be an int. | 43 // For legacy reasons the default value is currently restricted to be an int. |
44 // TODO(raymes): We should migrate the underlying pref to be a dictionary | 44 // TODO(raymes): We should migrate the underlying pref to be a dictionary |
45 // rather than an int. | 45 // rather than an int. |
46 DCHECK(!initial_default_value_ || | 46 DCHECK(!initial_default_value_ || |
47 initial_default_value_->IsType(base::Value::TYPE_INTEGER)); | 47 initial_default_value_->IsType(base::Value::TYPE_INTEGER)); |
48 } | 48 } |
49 | 49 |
50 WebsiteSettingsInfo::~WebsiteSettingsInfo() {} | 50 WebsiteSettingsInfo::~WebsiteSettingsInfo() {} |
51 | 51 |
52 uint32 WebsiteSettingsInfo::GetPrefRegistrationFlags() const { | 52 uint32_t WebsiteSettingsInfo::GetPrefRegistrationFlags() const { |
53 uint32 flags = PrefRegistry::NO_REGISTRATION_FLAGS; | 53 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS; |
54 | 54 |
55 if (sync_status_ == SYNCABLE) | 55 if (sync_status_ == SYNCABLE) |
56 flags |= user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; | 56 flags |= user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; |
57 | 57 |
58 if (lossy_status_ == LOSSY) | 58 if (lossy_status_ == LOSSY) |
59 flags |= PrefRegistry::LOSSY_PREF; | 59 flags |= PrefRegistry::LOSSY_PREF; |
60 | 60 |
61 return flags; | 61 return flags; |
62 } | 62 } |
63 | 63 |
64 } // namespace content_settings | 64 } // namespace content_settings |
OLD | NEW |