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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 LOG(ERROR) << message << " (http://crbug.com/431005)"; | 267 LOG(ERROR) << message << " (http://crbug.com/431005)"; |
268 } else if (strstr(message, "deprecated")) { | 268 } else if (strstr(message, "deprecated")) { |
269 LOG(ERROR) << message; | 269 LOG(ERROR) << message; |
270 } else { | 270 } else { |
271 LOG(DFATAL) << log_domain << ": " << message; | 271 LOG(DFATAL) << log_domain << ": " << message; |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 static void SetUpGLibLogHandler() { | 275 static void SetUpGLibLogHandler() { |
276 // Register GLib-handled assertions to go through our logging system. | 276 // Register GLib-handled assertions to go through our logging system. |
277 const char* kLogDomains[] = { NULL, "Gtk", "Gdk", "GLib", "GLib-GObject" }; | 277 const char* const kLogDomains[] = |
| 278 { nullptr, "Gtk", "Gdk", "GLib", "GLib-GObject" }; |
278 for (size_t i = 0; i < arraysize(kLogDomains); i++) { | 279 for (size_t i = 0; i < arraysize(kLogDomains); i++) { |
279 g_log_set_handler(kLogDomains[i], | 280 g_log_set_handler(kLogDomains[i], |
280 static_cast<GLogLevelFlags>(G_LOG_FLAG_RECURSION | | 281 static_cast<GLogLevelFlags>(G_LOG_FLAG_RECURSION | |
281 G_LOG_FLAG_FATAL | | 282 G_LOG_FLAG_FATAL | |
282 G_LOG_LEVEL_ERROR | | 283 G_LOG_LEVEL_ERROR | |
283 G_LOG_LEVEL_CRITICAL | | 284 G_LOG_LEVEL_CRITICAL | |
284 G_LOG_LEVEL_WARNING), | 285 G_LOG_LEVEL_WARNING), |
285 GLibLogHandler, | 286 GLibLogHandler, |
286 NULL); | 287 NULL); |
287 } | 288 } |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 DCHECK(is_tracing_startup_for_duration_); | 1448 DCHECK(is_tracing_startup_for_duration_); |
1448 | 1449 |
1449 is_tracing_startup_for_duration_ = false; | 1450 is_tracing_startup_for_duration_ = false; |
1450 TracingController::GetInstance()->StopTracing( | 1451 TracingController::GetInstance()->StopTracing( |
1451 TracingController::CreateFileSink( | 1452 TracingController::CreateFileSink( |
1452 startup_trace_file_, | 1453 startup_trace_file_, |
1453 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1454 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1454 } | 1455 } |
1455 | 1456 |
1456 } // namespace content | 1457 } // namespace content |
OLD | NEW |