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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WIP, latest changes from kaiwang@ 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/ui/webui/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 ManagementPolicy* policy) 98 ManagementPolicy* policy)
99 : extension_service_(service), 99 : extension_service_(service),
100 management_policy_(policy), 100 management_policy_(policy),
101 ignore_notifications_(false), 101 ignore_notifications_(false),
102 deleting_rvh_(NULL), 102 deleting_rvh_(NULL),
103 registered_for_notifications_(false), 103 registered_for_notifications_(false),
104 ALLOW_THIS_IN_INITIALIZER_LIST(warning_service_observer_(this)) { 104 ALLOW_THIS_IN_INITIALIZER_LIST(warning_service_observer_(this)) {
105 } 105 }
106 106
107 // static 107 // static
108 void ExtensionSettingsHandler::RegisterUserPrefs(PrefService* prefs) { 108 void ExtensionSettingsHandler::RegisterUserPrefs(PrefServiceSyncable* prefs) {
109 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, 109 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode,
110 false, 110 false,
111 PrefService::SYNCABLE_PREF); 111 PrefServiceSyncable::SYNCABLE_PREF);
112 } 112 }
113 113
114 DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( 114 DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
115 const Extension* extension, 115 const Extension* extension,
116 const std::vector<ExtensionPage>& pages, 116 const std::vector<ExtensionPage>& pages,
117 const extensions::ExtensionWarningService* warning_service) { 117 const extensions::ExtensionWarningService* warning_service) {
118 DictionaryValue* extension_data = new DictionaryValue(); 118 DictionaryValue* extension_data = new DictionaryValue();
119 bool enabled = extension_service_->IsExtensionEnabled(extension->id()); 119 bool enabled = extension_service_->IsExtensionEnabled(extension->id());
120 extension->GetBasicInfo(enabled, extension_data); 120 extension->GetBasicInfo(enabled, extension_data);
121 121
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 std::vector<std::string> requirement_errors) { 970 std::vector<std::string> requirement_errors) {
971 if (requirement_errors.empty()) { 971 if (requirement_errors.empty()) {
972 extension_service_->EnableExtension(extension_id); 972 extension_service_->EnableExtension(extension_id);
973 } else { 973 } else {
974 ExtensionErrorReporter::GetInstance()->ReportError( 974 ExtensionErrorReporter::GetInstance()->ReportError(
975 UTF8ToUTF16(JoinString(requirement_errors, ' ')), 975 UTF8ToUTF16(JoinString(requirement_errors, ' ')),
976 true /* be noisy */); 976 true /* be noisy */);
977 } 977 }
978 requirements_checker_.reset(); 978 requirements_checker_.reset();
979 } 979 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698