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 "chrome/browser/pepper_flash_settings_manager.h" | 5 #include "chrome/browser/pepper_flash_settings_manager.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 if (webkit::IsPepperPlugin(*iter) && plugin_prefs->IsPluginEnabled(*iter)) { | 962 if (webkit::IsPepperPlugin(*iter) && plugin_prefs->IsPluginEnabled(*iter)) { |
963 if (plugin_info) | 963 if (plugin_info) |
964 *plugin_info = *iter; | 964 *plugin_info = *iter; |
965 return true; | 965 return true; |
966 } | 966 } |
967 } | 967 } |
968 return false; | 968 return false; |
969 } | 969 } |
970 | 970 |
971 // static | 971 // static |
972 void PepperFlashSettingsManager::RegisterUserPrefs( | 972 void PepperFlashSettingsManager::RegisterProfilePrefs( |
973 user_prefs::PrefRegistrySyncable* registry) { | 973 user_prefs::PrefRegistrySyncable* registry) { |
974 registry->RegisterBooleanPref( | 974 registry->RegisterBooleanPref( |
975 prefs::kDeauthorizeContentLicenses, | 975 prefs::kDeauthorizeContentLicenses, |
976 false, | 976 false, |
977 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 977 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
978 | 978 |
979 registry->RegisterBooleanPref( | 979 registry->RegisterBooleanPref( |
980 prefs::kPepperFlashSettingsEnabled, | 980 prefs::kPepperFlashSettingsEnabled, |
981 true, | 981 true, |
982 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 982 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 } | 1063 } |
1064 | 1064 |
1065 void PepperFlashSettingsManager::OnError(Core* core) { | 1065 void PepperFlashSettingsManager::OnError(Core* core) { |
1066 DCHECK(core); | 1066 DCHECK(core); |
1067 if (core != core_.get()) | 1067 if (core != core_.get()) |
1068 return; | 1068 return; |
1069 | 1069 |
1070 core_->Detach(); | 1070 core_->Detach(); |
1071 core_ = NULL; | 1071 core_ = NULL; |
1072 } | 1072 } |
OLD | NEW |