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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 extension_data->SetBoolean("allowFileAccess", | 185 extension_data->SetBoolean("allowFileAccess", |
186 extension_service_->AllowFileAccess(extension)); | 186 extension_service_->AllowFileAccess(extension)); |
187 extension_data->SetBoolean("allow_reload", | 187 extension_data->SetBoolean("allow_reload", |
188 Manifest::IsUnpackedLocation(extension->location())); | 188 Manifest::IsUnpackedLocation(extension->location())); |
189 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); | 189 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); |
190 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); | 190 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); |
191 extension_data->SetBoolean("homepageProvided", | 191 extension_data->SetBoolean("homepageProvided", |
192 ManifestURL::GetHomepageURL(extension).is_valid()); | 192 ManifestURL::GetHomepageURL(extension).is_valid()); |
193 | 193 |
194 string16 location_text; | 194 string16 location_text; |
195 if (extension->location() == Manifest::EXTERNAL_POLICY_DOWNLOAD) { | 195 if (extension->location() == Manifest::EXTERNAL_POLICY || |
196 extension->location() == Manifest::EXTERNAL_POLICY_DOWNLOAD) { | |
not at google - send to devlin
2013/09/23 21:17:32
there is a lot of this. perhaps add Manifest::IsPo
bartfab (slow)
2013/09/26 14:29:54
Done.
| |
196 location_text = l10n_util::GetStringUTF16( | 197 location_text = l10n_util::GetStringUTF16( |
197 IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE); | 198 IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE); |
198 } else if (extension->location() == Manifest::INTERNAL && | 199 } else if (extension->location() == Manifest::INTERNAL && |
199 !ManifestURL::UpdatesFromGallery(extension)) { | 200 !ManifestURL::UpdatesFromGallery(extension)) { |
200 location_text = l10n_util::GetStringUTF16( | 201 location_text = l10n_util::GetStringUTF16( |
201 IDS_OPTIONS_INSTALL_LOCATION_UNKNOWN); | 202 IDS_OPTIONS_INSTALL_LOCATION_UNKNOWN); |
202 } else if (extension->location() == Manifest::EXTERNAL_REGISTRY) { | 203 } else if (extension->location() == Manifest::EXTERNAL_REGISTRY) { |
203 location_text = l10n_util::GetStringUTF16( | 204 location_text = l10n_util::GetStringUTF16( |
204 IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY); | 205 IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY); |
205 } | 206 } |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1165 extension_service_->EnableExtension(extension_id); | 1166 extension_service_->EnableExtension(extension_id); |
1166 } else { | 1167 } else { |
1167 ExtensionErrorReporter::GetInstance()->ReportError( | 1168 ExtensionErrorReporter::GetInstance()->ReportError( |
1168 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1169 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1169 true /* be noisy */); | 1170 true /* be noisy */); |
1170 } | 1171 } |
1171 requirements_checker_.reset(); | 1172 requirements_checker_.reset(); |
1172 } | 1173 } |
1173 | 1174 |
1174 } // namespace extensions | 1175 } // namespace extensions |
OLD | NEW |