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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |