| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/device_event_log/device_event_log_impl.h" | 5 #include "components/device_event_log/device_event_log_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 if (tok == "level") | 213 if (tok == "level") |
| 214 *show_level = true; | 214 *show_level = true; |
| 215 if (tok == "html") | 215 if (tok == "html") |
| 216 *format_html = true; | 216 *format_html = true; |
| 217 if (tok == "json") | 217 if (tok == "json") |
| 218 *format_json = true; | 218 *format_json = true; |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 LogType LogTypeFromString(const std::string& desc) { | 222 LogType LogTypeFromString(const std::string& desc) { |
| 223 std::string desc_lc = base::StringToLowerASCII(desc); | 223 std::string desc_lc = base::ToLowerASCII(desc); |
| 224 if (desc_lc == "network") | 224 if (desc_lc == "network") |
| 225 return LOG_TYPE_NETWORK; | 225 return LOG_TYPE_NETWORK; |
| 226 if (desc_lc == "power") | 226 if (desc_lc == "power") |
| 227 return LOG_TYPE_POWER; | 227 return LOG_TYPE_POWER; |
| 228 if (desc_lc == "login") | 228 if (desc_lc == "login") |
| 229 return LOG_TYPE_LOGIN; | 229 return LOG_TYPE_LOGIN; |
| 230 NOTREACHED() << "Unrecogized LogType: " << desc; | 230 NOTREACHED() << "Unrecogized LogType: " << desc; |
| 231 return LOG_TYPE_UNKNOWN; | 231 return LOG_TYPE_UNKNOWN; |
| 232 } | 232 } |
| 233 | 233 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 if (filedesc) { | 424 if (filedesc) { |
| 425 file = filedesc; | 425 file = filedesc; |
| 426 size_t last_slash_pos = file.find_last_of("\\/"); | 426 size_t last_slash_pos = file.find_last_of("\\/"); |
| 427 if (last_slash_pos != std::string::npos) { | 427 if (last_slash_pos != std::string::npos) { |
| 428 file.erase(0, last_slash_pos + 1); | 428 file.erase(0, last_slash_pos + 1); |
| 429 } | 429 } |
| 430 } | 430 } |
| 431 } | 431 } |
| 432 | 432 |
| 433 } // namespace device_event_log | 433 } // namespace device_event_log |
| OLD | NEW |