| 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::RegisterUserPrefs( |
| 973 PrefRegistrySyncable* registry) { | 973 user_prefs::PrefRegistrySyncable* registry) { |
| 974 registry->RegisterBooleanPref(prefs::kDeauthorizeContentLicenses, | 974 registry->RegisterBooleanPref( |
| 975 false, | 975 prefs::kDeauthorizeContentLicenses, |
| 976 PrefRegistrySyncable::UNSYNCABLE_PREF); | 976 false, |
| 977 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 977 | 978 |
| 978 registry->RegisterBooleanPref(prefs::kPepperFlashSettingsEnabled, | 979 registry->RegisterBooleanPref( |
| 979 true, | 980 prefs::kPepperFlashSettingsEnabled, |
| 980 PrefRegistrySyncable::UNSYNCABLE_PREF); | 981 true, |
| 982 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 981 } | 983 } |
| 982 | 984 |
| 983 uint32 PepperFlashSettingsManager::DeauthorizeContentLicenses( | 985 uint32 PepperFlashSettingsManager::DeauthorizeContentLicenses( |
| 984 PrefService* prefs) { | 986 PrefService* prefs) { |
| 985 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 987 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 986 | 988 |
| 987 // Clear the device ID salt which has the effect of regenerating a device | 989 // Clear the device ID salt which has the effect of regenerating a device |
| 988 // ID. Since this happens synchronously (and on the UI thread), we don't have | 990 // ID. Since this happens synchronously (and on the UI thread), we don't have |
| 989 // to add it to a pending request. | 991 // to add it to a pending request. |
| 990 prefs->ClearPref(prefs::kDRMSalt); | 992 prefs->ClearPref(prefs::kDRMSalt); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 } | 1063 } |
| 1062 | 1064 |
| 1063 void PepperFlashSettingsManager::OnError(Core* core) { | 1065 void PepperFlashSettingsManager::OnError(Core* core) { |
| 1064 DCHECK(core); | 1066 DCHECK(core); |
| 1065 if (core != core_.get()) | 1067 if (core != core_.get()) |
| 1066 return; | 1068 return; |
| 1067 | 1069 |
| 1068 core_->Detach(); | 1070 core_->Detach(); |
| 1069 core_ = NULL; | 1071 core_ = NULL; |
| 1070 } | 1072 } |
| OLD | NEW |