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/ui/webui/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 } | 332 } |
333 extension_data->Set("warnings", warnings_list); | 333 extension_data->Set("warnings", warnings_list); |
334 } | 334 } |
335 } | 335 } |
336 | 336 |
337 // If the ErrorConsole is enabled, get the errors for the extension and add | 337 // If the ErrorConsole is enabled, get the errors for the extension and add |
338 // them to the list. Otherwise, use the install warnings (using both is | 338 // them to the list. Otherwise, use the install warnings (using both is |
339 // redundant). | 339 // redundant). |
340 ErrorConsole* error_console = | 340 ErrorConsole* error_console = |
341 ErrorConsole::Get(extension_service_->profile()); | 341 ErrorConsole::Get(extension_service_->profile()); |
342 if (error_console->enabled()) { | 342 if (error_console->IsEnabledForChromeExtensionsPage()) { |
343 const ErrorList& errors = | 343 const ErrorList& errors = |
344 error_console->GetErrorsForExtension(extension->id()); | 344 error_console->GetErrorsForExtension(extension->id()); |
345 if (!errors.empty()) { | 345 if (!errors.empty()) { |
346 scoped_ptr<base::ListValue> manifest_errors(new base::ListValue); | 346 scoped_ptr<base::ListValue> manifest_errors(new base::ListValue); |
347 scoped_ptr<base::ListValue> runtime_errors(new base::ListValue); | 347 scoped_ptr<base::ListValue> runtime_errors(new base::ListValue); |
348 for (ErrorList::const_iterator iter = errors.begin(); | 348 for (ErrorList::const_iterator iter = errors.begin(); |
349 iter != errors.end(); ++iter) { | 349 iter != errors.end(); ++iter) { |
350 if ((*iter)->type() == ExtensionError::MANIFEST_ERROR) { | 350 if ((*iter)->type() == ExtensionError::MANIFEST_ERROR) { |
351 manifest_errors->Append((*iter)->ToValue().release()); | 351 manifest_errors->Append((*iter)->ToValue().release()); |
352 } else { // Handle runtime error. | 352 } else { // Handle runtime error. |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 const base::FilePath& path) { | 1329 const base::FilePath& path) { |
1330 if (IndexOfLoadingPath(path) == -1) | 1330 if (IndexOfLoadingPath(path) == -1) |
1331 return; // Not an extension we're tracking. | 1331 return; // Not an extension we're tracking. |
1332 if (retry) | 1332 if (retry) |
1333 LoadUnpackedExtension(path); | 1333 LoadUnpackedExtension(path); |
1334 else | 1334 else |
1335 RemoveLoadingPath(path); | 1335 RemoveLoadingPath(path); |
1336 } | 1336 } |
1337 | 1337 |
1338 } // namespace extensions | 1338 } // namespace extensions |
OLD | NEW |