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/extensions/api/developer_private/developer_private_api.
h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 if (error_console->enabled()) { | 355 if (error_console->enabled()) { |
356 const ErrorList& errors = error_console->GetErrorsForExtension(item.id()); | 356 const ErrorList& errors = error_console->GetErrorsForExtension(item.id()); |
357 if (!errors.empty()) { | 357 if (!errors.empty()) { |
358 for (ErrorList::const_iterator iter = errors.begin(); | 358 for (ErrorList::const_iterator iter = errors.begin(); |
359 iter != errors.end(); | 359 iter != errors.end(); |
360 ++iter) { | 360 ++iter) { |
361 switch ((*iter)->type()) { | 361 switch ((*iter)->type()) { |
362 case ExtensionError::MANIFEST_ERROR: | 362 case ExtensionError::MANIFEST_ERROR: |
363 info->manifest_errors.push_back( | 363 info->manifest_errors.push_back( |
364 make_linked_ptr((*iter)->ToValue().release())); | 364 make_linked_ptr((*iter)->ToValue().release())); |
| 365 break; |
365 case ExtensionError::RUNTIME_ERROR: { | 366 case ExtensionError::RUNTIME_ERROR: { |
366 const RuntimeError* error = | 367 const RuntimeError* error = |
367 static_cast<const RuntimeError*>(*iter); | 368 static_cast<const RuntimeError*>(*iter); |
368 scoped_ptr<base::DictionaryValue> value = error->ToValue(); | 369 scoped_ptr<base::DictionaryValue> value = error->ToValue(); |
369 bool can_inspect = content::RenderViewHost::FromID( | 370 bool can_inspect = content::RenderViewHost::FromID( |
370 error->render_process_id(), | 371 error->render_process_id(), |
371 error->render_view_id()) != NULL; | 372 error->render_view_id()) != NULL; |
372 value->SetBoolean("canInspect", can_inspect); | 373 value->SetBoolean("canInspect", can_inspect); |
373 info->runtime_errors.push_back(make_linked_ptr(value.release())); | 374 info->runtime_errors.push_back(make_linked_ptr(value.release())); |
| 375 break; |
374 } | 376 } |
375 } | 377 } |
376 } | 378 } |
377 } | 379 } |
378 } else { | 380 } else { |
379 for (std::vector<extensions::InstallWarning>::const_iterator it = | 381 for (std::vector<extensions::InstallWarning>::const_iterator it = |
380 item.install_warnings().begin(); | 382 item.install_warnings().begin(); |
381 it != item.install_warnings().end(); | 383 it != item.install_warnings().end(); |
382 ++it) { | 384 ++it) { |
383 scoped_ptr<developer::InstallWarning> warning( | 385 scoped_ptr<developer::InstallWarning> warning( |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 } | 1337 } |
1336 | 1338 |
1337 error_ui_util::HandleOpenDevTools(dict); | 1339 error_ui_util::HandleOpenDevTools(dict); |
1338 | 1340 |
1339 return true; | 1341 return true; |
1340 } | 1342 } |
1341 | 1343 |
1342 } // namespace api | 1344 } // namespace api |
1343 | 1345 |
1344 } // namespace extensions | 1346 } // namespace extensions |
OLD | NEW |