| 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 "chromeos/device_event_log_impl.h" | 5 #include "components/device_event_log/device_event_log_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace chromeos { | |
| 18 | |
| 19 namespace device_event_log { | 17 namespace device_event_log { |
| 20 | 18 |
| 21 namespace { | 19 namespace { |
| 22 | 20 |
| 23 const size_t kDefaultMaxEvents = 100; | 21 const size_t kDefaultMaxEvents = 100; |
| 24 LogLevel kDefaultLevel = LOG_LEVEL_EVENT; | 22 LogLevel kDefaultLevel = LOG_LEVEL_EVENT; |
| 25 LogType kDefaultType = LOG_TYPE_NETWORK; | 23 LogType kDefaultType = LOG_TYPE_NETWORK; |
| 26 | 24 |
| 27 } // namespace | 25 } // namespace |
| 28 | 26 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 "Power: event2\n" | 252 "Power: event2\n" |
| 255 "Network: event3\n" | 253 "Network: event3\n" |
| 256 "Power: event4\n" | 254 "Power: event4\n" |
| 257 "Network: event5\n" | 255 "Network: event5\n" |
| 258 "Network: event6\n"); | 256 "Network: event6\n"); |
| 259 EXPECT_EQ(all_events, GetLogStringForType("network,power")); | 257 EXPECT_EQ(all_events, GetLogStringForType("network,power")); |
| 260 EXPECT_EQ(all_events, GetLogStringForType("")); | 258 EXPECT_EQ(all_events, GetLogStringForType("")); |
| 261 } | 259 } |
| 262 | 260 |
| 263 } // namespace device_event_log | 261 } // namespace device_event_log |
| 264 | |
| 265 } // namespace chromeos | |
| OLD | NEW |