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 "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 extension_service_->AllowFileAccess(extension)); | 163 extension_service_->AllowFileAccess(extension)); |
164 extension_data->SetBoolean("allow_reload", | 164 extension_data->SetBoolean("allow_reload", |
165 Manifest::IsUnpackedLocation(extension->location())); | 165 Manifest::IsUnpackedLocation(extension->location())); |
166 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); | 166 extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app()); |
167 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); | 167 extension_data->SetBoolean("is_platform_app", extension->is_platform_app()); |
168 extension_data->SetBoolean("homepageProvided", | 168 extension_data->SetBoolean("homepageProvided", |
169 extensions::ManifestURL::GetHomepageURL(extension).is_valid()); | 169 extensions::ManifestURL::GetHomepageURL(extension).is_valid()); |
170 | 170 |
171 string16 location_text; | 171 string16 location_text; |
172 if (extension->location() == Manifest::INTERNAL && | 172 if (extension->location() == Manifest::INTERNAL && |
173 !extension->UpdatesFromGallery()) { | 173 !extensions::ManifestURL::UpdatesFromGallery(extension)) { |
174 location_text = l10n_util::GetStringUTF16( | 174 location_text = l10n_util::GetStringUTF16( |
175 IDS_OPTIONS_INSTALL_LOCATION_UNKNOWN); | 175 IDS_OPTIONS_INSTALL_LOCATION_UNKNOWN); |
176 } else if (extension->location() == Manifest::EXTERNAL_REGISTRY) { | 176 } else if (extension->location() == Manifest::EXTERNAL_REGISTRY) { |
177 location_text = l10n_util::GetStringUTF16( | 177 location_text = l10n_util::GetStringUTF16( |
178 IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY); | 178 IDS_OPTIONS_INSTALL_LOCATION_3RD_PARTY); |
179 } | 179 } |
180 extension_data->SetString("locationText", location_text); | 180 extension_data->SetString("locationText", location_text); |
181 | 181 |
182 // Determine the sort order: Extensions loaded through --load-extensions show | 182 // Determine the sort order: Extensions loaded through --load-extensions show |
183 // up at the top. Disabled extensions show up at the bottom. | 183 // up at the top. Disabled extensions show up at the bottom. |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 std::vector<std::string> requirement_errors) { | 1037 std::vector<std::string> requirement_errors) { |
1038 if (requirement_errors.empty()) { | 1038 if (requirement_errors.empty()) { |
1039 extension_service_->EnableExtension(extension_id); | 1039 extension_service_->EnableExtension(extension_id); |
1040 } else { | 1040 } else { |
1041 ExtensionErrorReporter::GetInstance()->ReportError( | 1041 ExtensionErrorReporter::GetInstance()->ReportError( |
1042 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1042 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1043 true /* be noisy */); | 1043 true /* be noisy */); |
1044 } | 1044 } |
1045 requirements_checker_.reset(); | 1045 requirements_checker_.reset(); |
1046 } | 1046 } |
OLD | NEW |