| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 extension_data->Set("dependentExtensions", dependents_list); | 286 extension_data->Set("dependentExtensions", dependents_list); |
| 287 | 287 |
| 288 // Extensions only want all URL access if: | 288 // Extensions only want all URL access if: |
| 289 // - The feature is enabled for the given extension. | 289 // - The feature is enabled for the given extension. |
| 290 // - The extension has access to enough urls that we can't just let it run | 290 // - The extension has access to enough urls that we can't just let it run |
| 291 // on those specified in the permissions. | 291 // on those specified in the permissions. |
| 292 bool wants_all_urls = | 292 bool wants_all_urls = |
| 293 util::ScriptsMayRequireActionForExtension(extension) && | 293 util::ScriptsMayRequireActionForExtension(extension) && |
| 294 (extension->permissions_data()->HasWithheldImpliedAllHosts() || | 294 extension->permissions_data()->HasWithheldImpliedAllHosts(); |
| 295 util::AllowedScriptingOnAllUrls( | |
| 296 extension->id(), extension_service_->GetBrowserContext())); | |
| 297 extension_data->SetBoolean("wantsAllUrls", wants_all_urls); | 295 extension_data->SetBoolean("wantsAllUrls", wants_all_urls); |
| 298 extension_data->SetBoolean( | 296 extension_data->SetBoolean( |
| 299 "allowAllUrls", | 297 "allowAllUrls", |
| 300 util::AllowedScriptingOnAllUrls( | 298 util::AllowedScriptingOnAllUrls( |
| 301 extension->id(), | 299 extension->id(), |
| 302 extension_service_->GetBrowserContext())); | 300 extension_service_->GetBrowserContext())); |
| 303 | 301 |
| 304 base::string16 location_text; | 302 base::string16 location_text; |
| 305 if (Manifest::IsPolicyLocation(extension->location())) { | 303 if (Manifest::IsPolicyLocation(extension->location())) { |
| 306 location_text = l10n_util::GetStringUTF16( | 304 location_text = l10n_util::GetStringUTF16( |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 extension_service_->EnableExtension(extension_id); | 1406 extension_service_->EnableExtension(extension_id); |
| 1409 } else { | 1407 } else { |
| 1410 ExtensionErrorReporter::GetInstance()->ReportError( | 1408 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1411 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1409 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1412 true); // Be noisy. | 1410 true); // Be noisy. |
| 1413 } | 1411 } |
| 1414 requirements_checker_.reset(); | 1412 requirements_checker_.reset(); |
| 1415 } | 1413 } |
| 1416 | 1414 |
| 1417 } // namespace extensions | 1415 } // namespace extensions |
| OLD | NEW |