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

Unified Diff: ui/views/debug_utils.cc

Issue 12494011: Keyboard shortcut to log views, layers, windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« ash/accelerators/accelerator_controller.cc ('K') | « ui/views/debug_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/debug_utils.cc
diff --git a/ui/views/debug_utils.cc b/ui/views/debug_utils.cc
index 8259d6212eb6734da2dc4da0141f584ebfcefb65..d90e910a597960d6bd0be31a5824758add19b5dd 100644
--- a/ui/views/debug_utils.cc
+++ b/ui/views/debug_utils.cc
@@ -4,16 +4,12 @@
#include "ui/views/debug_utils.h"
+#include <iostream>
+
#include "base/logging.h"
#include "base/utf_string_conversions.h"
#include "ui/views/view.h"
-#ifndef NDEBUG
-#include <iostream>
-#endif
-
-#ifndef NDEBUG
-
namespace views {
namespace {
void PrintViewHierarchyImp(const View* view, int indent) {
@@ -30,8 +26,8 @@ void PrintViewHierarchyImp(const View* view, int indent) {
buf << L' ';
buf << view;
- DVLOG(1) << buf.str();
- std::cout << buf.str() << std::endl;
+ // Warning so users in the field can generate and upload logs.
+ LOG(WARNING) << buf.str();
for (int i = 0, count = view->child_count(); i < count; ++i)
PrintViewHierarchyImp(view->child_at(i), indent + 2);
@@ -50,8 +46,8 @@ void PrintFocusHierarchyImp(const View* view, int indent) {
buf << L' ';
buf << view;
- DVLOG(1) << buf.str();
- std::cout << buf.str() << std::endl;
+ // Warning so users in the field can generate and upload logs.
+ LOG(WARNING) << buf.str();
Daniel Erat 2013/03/16 03:32:23 any reason why this is WARNING instead of ERROR?
James Cook 2013/03/16 04:09:24 No, good catch.
if (view->child_count() > 0)
PrintFocusHierarchyImp(view->child_at(0), indent + 2);
@@ -71,5 +67,3 @@ void PrintFocusHierarchy(const View* view) {
}
} // namespace views
-
-#endif // NDEBUG
« ash/accelerators/accelerator_controller.cc ('K') | « ui/views/debug_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698