Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 22470007: Add a "key" entry to InstallWarnings, remove InstallWarning::Format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_infrastructure
Patch Set: Reordered params Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 // Add install warnings (these are not the same as warnings!). 249 // Add install warnings (these are not the same as warnings!).
250 if (Manifest::IsUnpackedLocation(extension->location())) { 250 if (Manifest::IsUnpackedLocation(extension->location())) {
251 const std::vector<InstallWarning>& install_warnings = 251 const std::vector<InstallWarning>& install_warnings =
252 extension->install_warnings(); 252 extension->install_warnings();
253 if (!install_warnings.empty()) { 253 if (!install_warnings.empty()) {
254 scoped_ptr<ListValue> list(new ListValue()); 254 scoped_ptr<ListValue> list(new ListValue());
255 for (std::vector<InstallWarning>::const_iterator it = 255 for (std::vector<InstallWarning>::const_iterator it =
256 install_warnings.begin(); it != install_warnings.end(); ++it) { 256 install_warnings.begin(); it != install_warnings.end(); ++it) {
257 DictionaryValue* item = new DictionaryValue(); 257 DictionaryValue* item = new DictionaryValue();
258 item->SetBoolean("isHTML", it->format == InstallWarning::FORMAT_HTML);
259 item->SetString("message", it->message); 258 item->SetString("message", it->message);
260 list->Append(item); 259 list->Append(item);
261 } 260 }
262 extension_data->Set("installWarnings", list.release()); 261 extension_data->Set("installWarnings", list.release());
263 } 262 }
264 } 263 }
265 264
266 return extension_data; 265 return extension_data;
267 } 266 }
268 267
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 extension_service_->EnableExtension(extension_id); 1078 extension_service_->EnableExtension(extension_id);
1080 } else { 1079 } else {
1081 ExtensionErrorReporter::GetInstance()->ReportError( 1080 ExtensionErrorReporter::GetInstance()->ReportError(
1082 UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1081 UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1083 true /* be noisy */); 1082 true /* be noisy */);
1084 } 1083 }
1085 requirements_checker_.reset(); 1084 requirements_checker_.reset();
1086 } 1085 }
1087 1086
1088 } // namespace extensions 1087 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698