Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extension_info_generat or.h" | 5 #include "chrome/browser/extensions/api/developer_private/extension_info_generat or.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/extensions/api/developer_private/inspectable_views_find er.h" | 8 #include "chrome/browser/extensions/api/developer_private/inspectable_views_find er.h" |
| 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
| 10 #include "chrome/browser/extensions/error_console/error_console.h" | 10 #include "chrome/browser/extensions/error_console/error_console.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 return result; | 96 return result; |
| 97 } | 97 } |
| 98 | 98 |
| 99 // Given a RuntimeError object, converts it into its developer_private | 99 // Given a RuntimeError object, converts it into its developer_private |
| 100 // counterpart. | 100 // counterpart. |
| 101 linked_ptr<developer::RuntimeError> ConstructRuntimeError( | 101 linked_ptr<developer::RuntimeError> ConstructRuntimeError( |
| 102 const RuntimeError& error) { | 102 const RuntimeError& error) { |
| 103 linked_ptr<developer::RuntimeError> result(new developer::RuntimeError()); | 103 linked_ptr<developer::RuntimeError> result(new developer::RuntimeError()); |
| 104 PopulateErrorBase(error, result.get()); | 104 PopulateErrorBase(error, result.get()); |
| 105 switch (error.level()) { | 105 switch (error.level()) { |
| 106 case logging::LOG_VERBOSE: | |
|
Devlin
2015/03/25 18:06:07
Hmm. Used to be ExtensionErrors would only ever h
Kevin M
2015/03/27 21:05:50
Done.
| |
| 106 case logging::LOG_INFO: | 107 case logging::LOG_INFO: |
| 107 result->severity = developer::ERROR_LEVEL_LOG; | 108 result->severity = developer::ERROR_LEVEL_LOG; |
| 108 break; | 109 break; |
| 109 case logging::LOG_WARNING: | 110 case logging::LOG_WARNING: |
| 110 result->severity = developer::ERROR_LEVEL_WARN; | 111 result->severity = developer::ERROR_LEVEL_WARN; |
| 111 break; | 112 break; |
| 112 case logging::LOG_ERROR: | 113 case logging::LOG_ERROR: |
| 113 result->severity = developer::ERROR_LEVEL_ERROR; | 114 result->severity = developer::ERROR_LEVEL_ERROR; |
| 114 break; | 115 break; |
| 115 default: | 116 default: |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 } | 389 } |
| 389 if (include_terminated) { | 390 if (include_terminated) { |
| 390 add_to_list(registry->terminated_extensions(), | 391 add_to_list(registry->terminated_extensions(), |
| 391 developer::EXTENSION_STATE_TERMINATED); | 392 developer::EXTENSION_STATE_TERMINATED); |
| 392 } | 393 } |
| 393 | 394 |
| 394 return list; | 395 return list; |
| 395 } | 396 } |
| 396 | 397 |
| 397 } // namespace extensions | 398 } // namespace extensions |
| OLD | NEW |