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