| 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/app_window.h" | 9 #include "apps/app_window.h" |
| 10 #include "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 extension_data->SetString("icon", icon.spec()); | 224 extension_data->SetString("icon", icon.spec()); |
| 225 extension_data->SetBoolean("isUnpacked", | 225 extension_data->SetBoolean("isUnpacked", |
| 226 Manifest::IsUnpackedLocation(extension->location())); | 226 Manifest::IsUnpackedLocation(extension->location())); |
| 227 ExtensionRegistry* registry = | 227 ExtensionRegistry* registry = |
| 228 ExtensionRegistry::Get(extension_service_->profile()); | 228 ExtensionRegistry::Get(extension_service_->profile()); |
| 229 extension_data->SetBoolean( | 229 extension_data->SetBoolean( |
| 230 "terminated", | 230 "terminated", |
| 231 registry->terminated_extensions().Contains(extension->id())); | 231 registry->terminated_extensions().Contains(extension->id())); |
| 232 extension_data->SetBoolean("enabledIncognito", | 232 extension_data->SetBoolean("enabledIncognito", |
| 233 util::IsIncognitoEnabled(extension->id(), extension_service_->profile())); | 233 util::IsIncognitoEnabled(extension->id(), extension_service_->profile())); |
| 234 extension_data->SetBoolean("incognitoCanBeToggled", | 234 extension_data->SetBoolean("incognitoCanBeEnabled", |
| 235 extension->can_be_incognito_enabled() && | 235 extension->can_be_incognito_enabled()); |
| 236 !extension->force_incognito_enabled()); | |
| 237 extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access()); | 236 extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access()); |
| 238 extension_data->SetBoolean("allowFileAccess", | 237 extension_data->SetBoolean("allowFileAccess", |
| 239 util::AllowFileAccess(extension->id(), extension_service_->profile())); | 238 util::AllowFileAccess(extension->id(), extension_service_->profile())); |
| 240 extension_data->SetBoolean("allow_reload", | 239 extension_data->SetBoolean("allow_reload", |
| 241 Manifest::IsUnpackedLocation(extension->location())); | 240 Manifest::IsUnpackedLocation(extension->location())); |
| 242 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); | 241 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); |
| 243 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); | 242 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); |
| 244 extension_data->SetBoolean("homepageProvided", | 243 extension_data->SetBoolean("homepageProvided", |
| 245 ManifestURL::GetHomepageURL(extension).is_valid()); | 244 ManifestURL::GetHomepageURL(extension).is_valid()); |
| 246 | 245 |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 extension_service_->EnableExtension(extension_id); | 1246 extension_service_->EnableExtension(extension_id); |
| 1248 } else { | 1247 } else { |
| 1249 ExtensionErrorReporter::GetInstance()->ReportError( | 1248 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1250 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1249 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1251 true /* be noisy */); | 1250 true /* be noisy */); |
| 1252 } | 1251 } |
| 1253 requirements_checker_.reset(); | 1252 requirements_checker_.reset(); |
| 1254 } | 1253 } |
| 1255 | 1254 |
| 1256 } // namespace extensions | 1255 } // namespace extensions |
| OLD | NEW |