| 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/test/chromedriver/logging.h" | 5 #include "chrome/test/chromedriver/logging.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "chrome/test/chromedriver/capabilities.h" | 15 #include "chrome/test/chromedriver/capabilities.h" |
| 16 #include "chrome/test/chromedriver/chrome/console_logger.h" | 16 #include "chrome/test/chromedriver/chrome/console_logger.h" |
| 17 #include "chrome/test/chromedriver/chrome/performance_logger.h" | |
| 18 #include "chrome/test/chromedriver/chrome/status.h" | 17 #include "chrome/test/chromedriver/chrome/status.h" |
| 18 #include "chrome/test/chromedriver/performance_logger.h" |
| 19 #include "chrome/test/chromedriver/session.h" | 19 #include "chrome/test/chromedriver/session.h" |
| 20 | 20 |
| 21 #if defined(OS_POSIX) | 21 #if defined(OS_POSIX) |
| 22 #include <fcntl.h> | 22 #include <fcntl.h> |
| 23 #include <unistd.h> | 23 #include <unistd.h> |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 new WebDriverLog(WebDriverLog::kBrowserType, browser_log_level); | 271 new WebDriverLog(WebDriverLog::kBrowserType, browser_log_level); |
| 272 logs.push_back(browser_log); | 272 logs.push_back(browser_log); |
| 273 // If the level is OFF, don't even bother listening for DevTools events. | 273 // If the level is OFF, don't even bother listening for DevTools events. |
| 274 if (browser_log_level != Log::kOff) | 274 if (browser_log_level != Log::kOff) |
| 275 listeners.push_back(new ConsoleLogger(browser_log)); | 275 listeners.push_back(new ConsoleLogger(browser_log)); |
| 276 | 276 |
| 277 out_logs->swap(logs); | 277 out_logs->swap(logs); |
| 278 out_listeners->swap(listeners); | 278 out_listeners->swap(listeners); |
| 279 return Status(kOk); | 279 return Status(kOk); |
| 280 } | 280 } |
| OLD | NEW |