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

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

Issue 215623002: Enable Error Console for ADT and <= Dev Channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/error_console/error_console.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 NOTREACHED(); 358 NOTREACHED();
359 } 359 }
360 360
361 if (Manifest::IsUnpackedLocation(item.location())) { 361 if (Manifest::IsUnpackedLocation(item.location())) {
362 info->path.reset( 362 info->path.reset(
363 new std::string(base::UTF16ToUTF8(item.path().LossyDisplayName()))); 363 new std::string(base::UTF16ToUTF8(item.path().LossyDisplayName())));
364 // If the ErrorConsole is enabled, get the errors for the extension and add 364 // If the ErrorConsole is enabled, get the errors for the extension and add
365 // them to the list. Otherwise, use the install warnings (using both is 365 // them to the list. Otherwise, use the install warnings (using both is
366 // redundant). 366 // redundant).
367 ErrorConsole* error_console = ErrorConsole::Get(GetProfile()); 367 ErrorConsole* error_console = ErrorConsole::Get(GetProfile());
368 if (error_console->enabled()) { 368 if (error_console->IsEnabledForAppsDeveloperTools()) {
369 const ErrorList& errors = error_console->GetErrorsForExtension(item.id()); 369 const ErrorList& errors = error_console->GetErrorsForExtension(item.id());
370 if (!errors.empty()) { 370 if (!errors.empty()) {
371 for (ErrorList::const_iterator iter = errors.begin(); 371 for (ErrorList::const_iterator iter = errors.begin();
372 iter != errors.end(); 372 iter != errors.end();
373 ++iter) { 373 ++iter) {
374 switch ((*iter)->type()) { 374 switch ((*iter)->type()) {
375 case ExtensionError::MANIFEST_ERROR: 375 case ExtensionError::MANIFEST_ERROR:
376 info->manifest_errors.push_back( 376 info->manifest_errors.push_back(
377 make_linked_ptr((*iter)->ToValue().release())); 377 make_linked_ptr((*iter)->ToValue().release()));
378 break; 378 break;
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 } 1359 }
1360 1360
1361 error_ui_util::HandleOpenDevTools(dict); 1361 error_ui_util::HandleOpenDevTools(dict);
1362 1362
1363 return true; 1363 return true;
1364 } 1364 }
1365 1365
1366 } // namespace api 1366 } // namespace api
1367 1367
1368 } // namespace extensions 1368 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/error_console/error_console.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698