Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/pepper_flash_settings_manager.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 if (webkit::IsPepperPlugin(*iter) && plugin_prefs->IsPluginEnabled(*iter)) { 920 if (webkit::IsPepperPlugin(*iter) && plugin_prefs->IsPluginEnabled(*iter)) {
921 if (plugin_info) 921 if (plugin_info)
922 *plugin_info = *iter; 922 *plugin_info = *iter;
923 return true; 923 return true;
924 } 924 }
925 } 925 }
926 return false; 926 return false;
927 } 927 }
928 928
929 // static 929 // static
930 void PepperFlashSettingsManager::RegisterUserPrefs(PrefService* prefs) { 930 void PepperFlashSettingsManager::RegisterUserPrefs(PrefServiceSyncable* prefs) {
931 prefs->RegisterBooleanPref(prefs::kDeauthorizeContentLicenses, 931 prefs->RegisterBooleanPref(prefs::kDeauthorizeContentLicenses,
932 false, 932 false,
933 PrefService::UNSYNCABLE_PREF); 933 PrefServiceSyncable::UNSYNCABLE_PREF);
934 934
935 prefs->RegisterBooleanPref(prefs::kPepperFlashSettingsEnabled, 935 prefs->RegisterBooleanPref(prefs::kPepperFlashSettingsEnabled,
936 true, 936 true,
937 PrefService::UNSYNCABLE_PREF); 937 PrefServiceSyncable::UNSYNCABLE_PREF);
938 } 938 }
939 939
940 uint32 PepperFlashSettingsManager::DeauthorizeContentLicenses() { 940 uint32 PepperFlashSettingsManager::DeauthorizeContentLicenses() {
941 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 941 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
942 942
943 EnsureCoreExists(); 943 EnsureCoreExists();
944 uint32 id = GetNextRequestId(); 944 uint32 id = GetNextRequestId();
945 core_->DeauthorizeContentLicenses(id); 945 core_->DeauthorizeContentLicenses(id);
946 return id; 946 return id;
947 } 947 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1012 }
1013 1013
1014 void PepperFlashSettingsManager::OnError(Core* core) { 1014 void PepperFlashSettingsManager::OnError(Core* core) {
1015 DCHECK(core); 1015 DCHECK(core);
1016 if (core != core_.get()) 1016 if (core != core_.get())
1017 return; 1017 return;
1018 1018
1019 core_->Detach(); 1019 core_->Detach();
1020 core_ = NULL; 1020 core_ = NULL;
1021 } 1021 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698