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 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 struct ProviderNamesSourceMapEntry { | 48 struct ProviderNamesSourceMapEntry { |
49 const char* provider_name; | 49 const char* provider_name; |
50 content_settings::SettingSource provider_source; | 50 content_settings::SettingSource provider_source; |
51 }; | 51 }; |
52 | 52 |
53 const ProviderNamesSourceMapEntry kProviderNamesSourceMap[] = { | 53 const ProviderNamesSourceMapEntry kProviderNamesSourceMap[] = { |
54 {"platform_app", content_settings::SETTING_SOURCE_EXTENSION}, | 54 {"platform_app", content_settings::SETTING_SOURCE_EXTENSION}, |
55 {"policy", content_settings::SETTING_SOURCE_POLICY}, | 55 {"policy", content_settings::SETTING_SOURCE_POLICY}, |
56 {"supervised_user", content_settings::SETTING_SOURCE_SUPERVISED}, | 56 {"supervised_user", content_settings::SETTING_SOURCE_SUPERVISED}, |
57 {"extension", content_settings::SETTING_SOURCE_EXTENSION}, | 57 {"extension", content_settings::SETTING_SOURCE_EXTENSION}, |
58 {"notification_content_settings_android", | |
raymes
2017/05/17 03:13:39
nit: notification_android
awdf
2017/05/17 17:14:41
Done.
| |
59 content_settings::SETTING_SOURCE_USER}, | |
58 {"preference", content_settings::SETTING_SOURCE_USER}, | 60 {"preference", content_settings::SETTING_SOURCE_USER}, |
59 {"default", content_settings::SETTING_SOURCE_USER}, | 61 {"default", content_settings::SETTING_SOURCE_USER}, |
60 }; | 62 }; |
61 | 63 |
62 // Enum describing the status of domain to origin migration of content settings. | 64 // Enum describing the status of domain to origin migration of content settings. |
63 // Migration will be done twice: once upon construction of the | 65 // Migration will be done twice: once upon construction of the |
64 // HostContentSettingsMap (before syncing any content settings) and once after | 66 // HostContentSettingsMap (before syncing any content settings) and once after |
65 // sync has finished. We always migrate before sync to ensure that settings will | 67 // sync has finished. We always migrate before sync to ensure that settings will |
66 // get migrated even if a user doesn't have sync enabled. We migrate after sync | 68 // get migrated even if a user doesn't have sync enabled. We migrate after sync |
67 // to ensure that any sync'd settings will be migrated. Once these events have | 69 // to ensure that any sync'd settings will be migrated. Once these events have |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
903 return base::WrapUnique(rule.value.get()->DeepCopy()); | 905 return base::WrapUnique(rule.value.get()->DeepCopy()); |
904 } | 906 } |
905 } | 907 } |
906 } | 908 } |
907 return std::unique_ptr<base::Value>(); | 909 return std::unique_ptr<base::Value>(); |
908 } | 910 } |
909 | 911 |
910 void HostContentSettingsMap::SetClockForTesting( | 912 void HostContentSettingsMap::SetClockForTesting( |
911 std::unique_ptr<base::Clock> clock) { | 913 std::unique_ptr<base::Clock> clock) { |
912 pref_provider_->SetClockForTesting(std::move(clock)); | 914 pref_provider_->SetClockForTesting(std::move(clock)); |
913 } | 915 } |
OLD | NEW |