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

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

Issue 2659843004: Remove BLUETOOTH_LOG from chrome://device-log. (Closed)
Patch Set: Created 3 years, 10 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 11 matching lines...) Expand all
22 22
23 namespace device_event_log { 23 namespace device_event_log {
24 24
25 namespace { 25 namespace {
26 26
27 const char* kLogLevelName[] = {"Error", "User", "Event", "Debug"}; 27 const char* kLogLevelName[] = {"Error", "User", "Event", "Debug"};
28 28
29 const char* kLogTypeNetworkDesc = "Network"; 29 const char* kLogTypeNetworkDesc = "Network";
30 const char* kLogTypePowerDesc = "Power"; 30 const char* kLogTypePowerDesc = "Power";
31 const char* kLogTypeLoginDesc = "Login"; 31 const char* kLogTypeLoginDesc = "Login";
32 const char* kLogTypeBluetoothDesc = "Bluetooth";
33 const char* kLogTypeUsbDesc = "USB"; 32 const char* kLogTypeUsbDesc = "USB";
34 const char* kLogTypeHidDesc = "HID"; 33 const char* kLogTypeHidDesc = "HID";
35 34
36 std::string GetLogTypeString(LogType type) { 35 std::string GetLogTypeString(LogType type) {
37 switch (type) { 36 switch (type) {
38 case LOG_TYPE_NETWORK: 37 case LOG_TYPE_NETWORK:
39 return kLogTypeNetworkDesc; 38 return kLogTypeNetworkDesc;
40 case LOG_TYPE_POWER: 39 case LOG_TYPE_POWER:
41 return kLogTypePowerDesc; 40 return kLogTypePowerDesc;
42 case LOG_TYPE_LOGIN: 41 case LOG_TYPE_LOGIN:
43 return kLogTypeLoginDesc; 42 return kLogTypeLoginDesc;
44 case LOG_TYPE_BLUETOOTH:
45 return kLogTypeBluetoothDesc;
46 case LOG_TYPE_USB: 43 case LOG_TYPE_USB:
47 return kLogTypeUsbDesc; 44 return kLogTypeUsbDesc;
48 case LOG_TYPE_HID: 45 case LOG_TYPE_HID:
49 return kLogTypeHidDesc; 46 return kLogTypeHidDesc;
50 default: 47 default:
51 NOTREACHED(); 48 NOTREACHED();
52 return "Unknown"; 49 return "Unknown";
53 } 50 }
54 } 51 }
55 52
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 size_t last_slash_pos = file.find_last_of("\\/"); 391 size_t last_slash_pos = file.find_last_of("\\/");
395 if (last_slash_pos != std::string::npos) { 392 if (last_slash_pos != std::string::npos) {
396 file.erase(0, last_slash_pos + 1); 393 file.erase(0, last_slash_pos + 1);
397 } 394 }
398 } 395 }
399 } 396 }
400 397
401 DeviceEventLogImpl::LogEntry::LogEntry(const LogEntry& other) = default; 398 DeviceEventLogImpl::LogEntry::LogEntry(const LogEntry& other) = default;
402 399
403 } // namespace device_event_log 400 } // 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