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

Side by Side Diff: chrome/browser/extensions/api/developer_private/extension_info_generator.cc

Issue 1016413004: [Extensions] Update Error Console UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Populates the common fields of an extension error. 72 // Populates the common fields of an extension error.
73 template <typename ErrorType> 73 template <typename ErrorType>
74 void PopulateErrorBase(const ExtensionError& error, ErrorType* out) { 74 void PopulateErrorBase(const ExtensionError& error, ErrorType* out) {
75 CHECK(out); 75 CHECK(out);
76 out->type = error.type() == ExtensionError::MANIFEST_ERROR ? 76 out->type = error.type() == ExtensionError::MANIFEST_ERROR ?
77 developer::ERROR_TYPE_MANIFEST : developer::ERROR_TYPE_RUNTIME; 77 developer::ERROR_TYPE_MANIFEST : developer::ERROR_TYPE_RUNTIME;
78 out->extension_id = error.extension_id(); 78 out->extension_id = error.extension_id();
79 out->from_incognito = error.from_incognito(); 79 out->from_incognito = error.from_incognito();
80 out->source = base::UTF16ToUTF8(error.source()); 80 out->source = base::UTF16ToUTF8(error.source());
81 out->message = base::UTF16ToUTF8(error.message()); 81 out->message = base::UTF16ToUTF8(error.message());
82 out->id = error.id();
82 } 83 }
83 84
84 // Given a ManifestError object, converts it into its developer_private 85 // Given a ManifestError object, converts it into its developer_private
85 // counterpart. 86 // counterpart.
86 linked_ptr<developer::ManifestError> ConstructManifestError( 87 linked_ptr<developer::ManifestError> ConstructManifestError(
87 const ManifestError& error) { 88 const ManifestError& error) {
88 linked_ptr<developer::ManifestError> result(new developer::ManifestError()); 89 linked_ptr<developer::ManifestError> result(new developer::ManifestError());
89 PopulateErrorBase(error, result.get()); 90 PopulateErrorBase(error, result.get());
90 result->manifest_key = base::UTF16ToUTF8(error.manifest_key()); 91 result->manifest_key = base::UTF16ToUTF8(error.manifest_key());
91 if (!error.manifest_specific().empty()) { 92 if (!error.manifest_specific().empty()) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 416 }
416 if (include_terminated) { 417 if (include_terminated) {
417 add_to_list(registry->terminated_extensions(), 418 add_to_list(registry->terminated_extensions(),
418 developer::EXTENSION_STATE_TERMINATED); 419 developer::EXTENSION_STATE_TERMINATED);
419 } 420 }
420 421
421 return list; 422 return list;
422 } 423 }
423 424
424 } // namespace extensions 425 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698