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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 dependents_list->Append(new base::StringValue((*i)->id())); | 279 dependents_list->Append(new base::StringValue((*i)->id())); |
280 } | 280 } |
281 } | 281 } |
282 extension_data->Set("dependentExtensions", dependents_list); | 282 extension_data->Set("dependentExtensions", dependents_list); |
283 | 283 |
284 // Extensions only want all URL access if: | 284 // Extensions only want all URL access if: |
285 // - The feature is enabled. | 285 // - The feature is enabled. |
286 // - The extension has access to enough urls that we can't just let it run | 286 // - The extension has access to enough urls that we can't just let it run |
287 // on those specified in the permissions. | 287 // on those specified in the permissions. |
288 bool wants_all_urls = | 288 bool wants_all_urls = |
289 extension->permissions_data()->HasWithheldImpliedAllHosts(); | 289 extension->permissions_data()->HasWithheldImpliedAllHosts() || |
| 290 util::AllowedScriptingOnAllUrls(extension->id(), |
| 291 extension_service_->GetBrowserContext()); |
290 extension_data->SetBoolean("wantsAllUrls", wants_all_urls); | 292 extension_data->SetBoolean("wantsAllUrls", wants_all_urls); |
291 extension_data->SetBoolean( | 293 extension_data->SetBoolean( |
292 "allowAllUrls", | 294 "allowAllUrls", |
293 util::AllowedScriptingOnAllUrls( | 295 util::AllowedScriptingOnAllUrls( |
294 extension->id(), | 296 extension->id(), |
295 extension_service_->GetBrowserContext())); | 297 extension_service_->GetBrowserContext())); |
296 | 298 |
297 base::string16 location_text; | 299 base::string16 location_text; |
298 if (Manifest::IsPolicyLocation(extension->location())) { | 300 if (Manifest::IsPolicyLocation(extension->location())) { |
299 location_text = l10n_util::GetStringUTF16( | 301 location_text = l10n_util::GetStringUTF16( |
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 extension_service_->EnableExtension(extension_id); | 1396 extension_service_->EnableExtension(extension_id); |
1395 } else { | 1397 } else { |
1396 ExtensionErrorReporter::GetInstance()->ReportError( | 1398 ExtensionErrorReporter::GetInstance()->ReportError( |
1397 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1399 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1398 true); // Be noisy. | 1400 true); // Be noisy. |
1399 } | 1401 } |
1400 requirements_checker_.reset(); | 1402 requirements_checker_.reset(); |
1401 } | 1403 } |
1402 | 1404 |
1403 } // namespace extensions | 1405 } // namespace extensions |
OLD | NEW |