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/saved_files_service.h" | 9 #include "apps/saved_files_service.h" |
10 #include "apps/shell_window.h" | 10 #include "apps/shell_window.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 extension_data->SetBoolean("allowFileAccess", | 217 extension_data->SetBoolean("allowFileAccess", |
218 extension_service_->AllowFileAccess(extension)); | 218 extension_service_->AllowFileAccess(extension)); |
219 extension_data->SetBoolean("allow_reload", | 219 extension_data->SetBoolean("allow_reload", |
220 Manifest::IsUnpackedLocation(extension->location())); | 220 Manifest::IsUnpackedLocation(extension->location())); |
221 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); | 221 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); |
222 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); | 222 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); |
223 extension_data->SetBoolean("homepageProvided", | 223 extension_data->SetBoolean("homepageProvided", |
224 ManifestURL::GetHomepageURL(extension).is_valid()); | 224 ManifestURL::GetHomepageURL(extension).is_valid()); |
225 | 225 |
226 string16 location_text; | 226 string16 location_text; |
227 if (extension->location() == Manifest::EXTERNAL_POLICY_DOWNLOAD) { | 227 if (Manifest::IsPolicyLocation(extension->location())) { |
228 location_text = l10n_util::GetStringUTF16( | 228 location_text = l10n_util::GetStringUTF16( |
229 IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE); | 229 IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE); |
230 } else if (extension->location() == Manifest::INTERNAL && | 230 } else if (extension->location() == Manifest::INTERNAL && |
231 !ManifestURL::UpdatesFromGallery(extension)) { | 231 !ManifestURL::UpdatesFromGallery(extension)) { |
232 location_text = l10n_util::GetStringUTF16( | 232 location_text = l10n_util::GetStringUTF16( |
233 IDS_OPTIONS_INSTALL_LOCATION_UNKNOWN); | 233 IDS_OPTIONS_INSTALL_LOCATION_UNKNOWN); |
234 } else if (extension->location() == Manifest::EXTERNAL_REGISTRY) { | 234 } else if (extension->location() == Manifest::EXTERNAL_REGISTRY) { |
235 location_text = l10n_util::GetStringUTF16( | 235 location_text = l10n_util::GetStringUTF16( |
236 IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY); | 236 IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY); |
237 } | 237 } |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 extension_service_->EnableExtension(extension_id); | 1199 extension_service_->EnableExtension(extension_id); |
1200 } else { | 1200 } else { |
1201 ExtensionErrorReporter::GetInstance()->ReportError( | 1201 ExtensionErrorReporter::GetInstance()->ReportError( |
1202 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1202 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1203 true /* be noisy */); | 1203 true /* be noisy */); |
1204 } | 1204 } |
1205 requirements_checker_.reset(); | 1205 requirements_checker_.reset(); |
1206 } | 1206 } |
1207 | 1207 |
1208 } // namespace extensions | 1208 } // namespace extensions |
OLD | NEW |