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

Side by Side Diff: components/device_event_log/device_event_log_impl.cc

Issue 1587723007: bluetooth: Add Bluetooth events to chrome://device-log/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove BLUETOOTH_LOG calls for now Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « components/device_event_log/device_event_log.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 24
25 namespace device_event_log { 25 namespace device_event_log {
26 26
27 namespace { 27 namespace {
28 28
29 const char* kLogLevelName[] = {"Error", "User", "Event", "Debug"}; 29 const char* kLogLevelName[] = {"Error", "User", "Event", "Debug"};
30 30
31 const char* kLogTypeNetworkDesc = "Network"; 31 const char* kLogTypeNetworkDesc = "Network";
32 const char* kLogTypePowerDesc = "Power"; 32 const char* kLogTypePowerDesc = "Power";
33 const char* kLogTypeLoginDesc = "Login"; 33 const char* kLogTypeLoginDesc = "Login";
34 const char* kLogTypeBluetoothDesc = "Bluetooth";
34 const char* kLogTypeUsbDesc = "USB"; 35 const char* kLogTypeUsbDesc = "USB";
35 const char* kLogTypeHidDesc = "HID"; 36 const char* kLogTypeHidDesc = "HID";
36 37
37 std::string GetLogTypeString(LogType type) { 38 std::string GetLogTypeString(LogType type) {
38 switch (type) { 39 switch (type) {
39 case LOG_TYPE_NETWORK: 40 case LOG_TYPE_NETWORK:
40 return kLogTypeNetworkDesc; 41 return kLogTypeNetworkDesc;
41 case LOG_TYPE_POWER: 42 case LOG_TYPE_POWER:
42 return kLogTypePowerDesc; 43 return kLogTypePowerDesc;
43 case LOG_TYPE_LOGIN: 44 case LOG_TYPE_LOGIN:
44 return kLogTypeLoginDesc; 45 return kLogTypeLoginDesc;
46 case LOG_TYPE_BLUETOOTH:
47 return kLogTypeBluetoothDesc;
45 case LOG_TYPE_USB: 48 case LOG_TYPE_USB:
46 return kLogTypeUsbDesc; 49 return kLogTypeUsbDesc;
47 case LOG_TYPE_HID: 50 case LOG_TYPE_HID:
48 return kLogTypeHidDesc; 51 return kLogTypeHidDesc;
49 default: 52 default:
50 NOTREACHED(); 53 NOTREACHED();
51 return "Unknown"; 54 return "Unknown";
52 } 55 }
53 } 56 }
54 57
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (filedesc) { 427 if (filedesc) {
425 file = filedesc; 428 file = filedesc;
426 size_t last_slash_pos = file.find_last_of("\\/"); 429 size_t last_slash_pos = file.find_last_of("\\/");
427 if (last_slash_pos != std::string::npos) { 430 if (last_slash_pos != std::string::npos) {
428 file.erase(0, last_slash_pos + 1); 431 file.erase(0, last_slash_pos + 1);
429 } 432 }
430 } 433 }
431 } 434 }
432 435
433 } // namespace device_event_log 436 } // namespace device_event_log
OLDNEW
« no previous file with comments | « components/device_event_log/device_event_log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698