| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 252 |
| 253 // Add install warnings (these are not the same as warnings!). | 253 // Add install warnings (these are not the same as warnings!). |
| 254 if (Manifest::IsUnpackedLocation(extension->location())) { | 254 if (Manifest::IsUnpackedLocation(extension->location())) { |
| 255 const std::vector<InstallWarning>& install_warnings = | 255 const std::vector<InstallWarning>& install_warnings = |
| 256 extension->install_warnings(); | 256 extension->install_warnings(); |
| 257 if (!install_warnings.empty()) { | 257 if (!install_warnings.empty()) { |
| 258 scoped_ptr<ListValue> list(new ListValue()); | 258 scoped_ptr<ListValue> list(new ListValue()); |
| 259 for (std::vector<InstallWarning>::const_iterator it = | 259 for (std::vector<InstallWarning>::const_iterator it = |
| 260 install_warnings.begin(); it != install_warnings.end(); ++it) { | 260 install_warnings.begin(); it != install_warnings.end(); ++it) { |
| 261 DictionaryValue* item = new DictionaryValue(); | 261 DictionaryValue* item = new DictionaryValue(); |
| 262 item->SetBoolean("isHTML", it->format == InstallWarning::FORMAT_HTML); | |
| 263 item->SetString("message", it->message); | 262 item->SetString("message", it->message); |
| 264 list->Append(item); | 263 list->Append(item); |
| 265 } | 264 } |
| 266 extension_data->Set("installWarnings", list.release()); | 265 extension_data->Set("installWarnings", list.release()); |
| 267 } | 266 } |
| 268 } | 267 } |
| 269 | 268 |
| 270 return extension_data; | 269 return extension_data; |
| 271 } | 270 } |
| 272 | 271 |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 extension_service_->EnableExtension(extension_id); | 1092 extension_service_->EnableExtension(extension_id); |
| 1094 } else { | 1093 } else { |
| 1095 ExtensionErrorReporter::GetInstance()->ReportError( | 1094 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1096 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1095 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1097 true /* be noisy */); | 1096 true /* be noisy */); |
| 1098 } | 1097 } |
| 1099 requirements_checker_.reset(); | 1098 requirements_checker_.reset(); |
| 1100 } | 1099 } |
| 1101 | 1100 |
| 1102 } // namespace extensions | 1101 } // namespace extensions |
| OLD | NEW |