| 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/ui/webui/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
| 6 | 6 |
| 7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
| 8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
| 9 #include "apps/saved_files_service.h" | 9 #include "apps/saved_files_service.h" |
| 10 #include "apps/shell_window.h" | 10 #include "apps/shell_window.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 ManagementPolicy* policy) | 119 ManagementPolicy* policy) |
| 120 : extension_service_(service), | 120 : extension_service_(service), |
| 121 management_policy_(policy), | 121 management_policy_(policy), |
| 122 ignore_notifications_(false), | 122 ignore_notifications_(false), |
| 123 deleting_rvh_(NULL), | 123 deleting_rvh_(NULL), |
| 124 registered_for_notifications_(false), | 124 registered_for_notifications_(false), |
| 125 warning_service_observer_(this) { | 125 warning_service_observer_(this) { |
| 126 } | 126 } |
| 127 | 127 |
| 128 // static | 128 // static |
| 129 void ExtensionSettingsHandler::RegisterUserPrefs( | 129 void ExtensionSettingsHandler::RegisterProfilePrefs( |
| 130 user_prefs::PrefRegistrySyncable* registry) { | 130 user_prefs::PrefRegistrySyncable* registry) { |
| 131 registry->RegisterBooleanPref( | 131 registry->RegisterBooleanPref( |
| 132 prefs::kExtensionsUIDeveloperMode, | 132 prefs::kExtensionsUIDeveloperMode, |
| 133 false, | 133 false, |
| 134 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 134 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 135 } | 135 } |
| 136 | 136 |
| 137 DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( | 137 DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( |
| 138 const Extension* extension, | 138 const Extension* extension, |
| 139 const std::vector<ExtensionPage>& pages, | 139 const std::vector<ExtensionPage>& pages, |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 std::vector<std::string> requirement_errors) { | 1068 std::vector<std::string> requirement_errors) { |
| 1069 if (requirement_errors.empty()) { | 1069 if (requirement_errors.empty()) { |
| 1070 extension_service_->EnableExtension(extension_id); | 1070 extension_service_->EnableExtension(extension_id); |
| 1071 } else { | 1071 } else { |
| 1072 ExtensionErrorReporter::GetInstance()->ReportError( | 1072 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1073 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1073 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1074 true /* be noisy */); | 1074 true /* be noisy */); |
| 1075 } | 1075 } |
| 1076 requirements_checker_.reset(); | 1076 requirements_checker_.reset(); |
| 1077 } | 1077 } |
| OLD | NEW |