Chromium Code Reviews| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 dependent_entry->SetString("name", (*i)->name()); | 281 dependent_entry->SetString("name", (*i)->name()); |
| 282 dependents_list->Append(dependent_entry); | 282 dependents_list->Append(dependent_entry); |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 extension_data->Set("dependentExtensions", dependents_list); | 285 extension_data->Set("dependentExtensions", dependents_list); |
| 286 | 286 |
| 287 // Extensions only want all URL access if: | 287 // Extensions only want all URL access if: |
| 288 // - The feature is enabled. | 288 // - The feature is enabled. |
| 289 // - 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 |
| 290 // on those specified in the permissions. | 290 // on those specified in the permissions. |
| 291 bool wants_all_urls = | 291 bool wants_all_urls = |
|
not at google - send to devlin
2014/08/18 17:57:37
This is becoming an increasingly misleading variab
| |
| 292 extension->permissions_data()->HasWithheldImpliedAllHosts() || | 292 (extension->permissions_data()->HasWithheldImpliedAllHosts() || |
| 293 util::AllowedScriptingOnAllUrls(extension->id(), | 293 util::AllowedScriptingOnAllUrls( |
|
not at google - send to devlin
2014/08/18 17:57:37
I think the problem is with AllowedScriptingOnAllU
| |
| 294 extension_service_->GetBrowserContext()); | 294 extension->id(), extension_service_->GetBrowserContext())) && |
| 295 FeatureSwitch::scripts_require_action()->IsEnabled(); | |
| 295 extension_data->SetBoolean("wantsAllUrls", wants_all_urls); | 296 extension_data->SetBoolean("wantsAllUrls", wants_all_urls); |
| 296 extension_data->SetBoolean( | 297 extension_data->SetBoolean( |
| 297 "allowAllUrls", | 298 "allowAllUrls", |
| 298 util::AllowedScriptingOnAllUrls( | 299 util::AllowedScriptingOnAllUrls( |
| 299 extension->id(), | 300 extension->id(), |
| 300 extension_service_->GetBrowserContext())); | 301 extension_service_->GetBrowserContext())); |
| 301 | 302 |
| 302 base::string16 location_text; | 303 base::string16 location_text; |
| 303 if (Manifest::IsPolicyLocation(extension->location())) { | 304 if (Manifest::IsPolicyLocation(extension->location())) { |
| 304 location_text = l10n_util::GetStringUTF16( | 305 location_text = l10n_util::GetStringUTF16( |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1402 extension_service_->EnableExtension(extension_id); | 1403 extension_service_->EnableExtension(extension_id); |
| 1403 } else { | 1404 } else { |
| 1404 ExtensionErrorReporter::GetInstance()->ReportError( | 1405 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1405 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1406 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1406 true); // Be noisy. | 1407 true); // Be noisy. |
| 1407 } | 1408 } |
| 1408 requirements_checker_.reset(); | 1409 requirements_checker_.reset(); |
| 1409 } | 1410 } |
| 1410 | 1411 |
| 1411 } // namespace extensions | 1412 } // namespace extensions |
| OLD | NEW |