| 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_window.h" | 8 #include "apps/app_window.h" |
| 9 #include "apps/app_window_registry.h" | 9 #include "apps/app_window_registry.h" |
| 10 #include "apps/saved_files_service.h" | 10 #include "apps/saved_files_service.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 // Add dependent extensions. | 270 // Add dependent extensions. |
| 271 base::ListValue* dependents_list = new base::ListValue; | 271 base::ListValue* dependents_list = new base::ListValue; |
| 272 if (extension->is_shared_module()) { | 272 if (extension->is_shared_module()) { |
| 273 scoped_ptr<ExtensionSet> dependent_extensions = | 273 scoped_ptr<ExtensionSet> dependent_extensions = |
| 274 extension_service_->shared_module_service()->GetDependentExtensions( | 274 extension_service_->shared_module_service()->GetDependentExtensions( |
| 275 extension); | 275 extension); |
| 276 for (ExtensionSet::const_iterator i = dependent_extensions->begin(); | 276 for (ExtensionSet::const_iterator i = dependent_extensions->begin(); |
| 277 i != dependent_extensions->end(); | 277 i != dependent_extensions->end(); |
| 278 i++) { | 278 i++) { |
| 279 dependents_list->Append(new base::StringValue((*i)->id())); | 279 base::DictionaryValue* dependent_entry = new base::DictionaryValue; |
| 280 dependent_entry->SetString("id", (*i)->id()); |
| 281 dependent_entry->SetString("name", (*i)->name()); |
| 282 dependents_list->Append(dependent_entry); |
| 280 } | 283 } |
| 281 } | 284 } |
| 282 extension_data->Set("dependentExtensions", dependents_list); | 285 extension_data->Set("dependentExtensions", dependents_list); |
| 283 | 286 |
| 284 // Extensions only want all URL access if: | 287 // Extensions only want all URL access if: |
| 285 // - The feature is enabled. | 288 // - The feature is enabled. |
| 286 // - The extension has access to enough urls that we can't just let it run | 289 // - The extension has access to enough urls that we can't just let it run |
| 287 // on those specified in the permissions. | 290 // on those specified in the permissions. |
| 288 bool wants_all_urls = | 291 bool wants_all_urls = |
| 289 extension->permissions_data()->HasWithheldImpliedAllHosts(); | 292 extension->permissions_data()->HasWithheldImpliedAllHosts(); |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 extension_service_->EnableExtension(extension_id); | 1397 extension_service_->EnableExtension(extension_id); |
| 1395 } else { | 1398 } else { |
| 1396 ExtensionErrorReporter::GetInstance()->ReportError( | 1399 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1397 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1400 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1398 true); // Be noisy. | 1401 true); // Be noisy. |
| 1399 } | 1402 } |
| 1400 requirements_checker_.reset(); | 1403 requirements_checker_.reset(); |
| 1401 } | 1404 } |
| 1402 | 1405 |
| 1403 } // namespace extensions | 1406 } // namespace extensions |
| OLD | NEW |