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 "net/base/trace_net_log_observer.h" | 5 #include "net/base/trace_net_log_observer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using base::trace_event::TraceLog; | 24 using base::trace_event::TraceLog; |
25 | 25 |
26 namespace net { | 26 namespace net { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // TraceLog category for NetLog events. | 30 // TraceLog category for NetLog events. |
31 const char kNetLogTracingCategory[] = TRACE_DISABLED_BY_DEFAULT("netlog"); | 31 const char kNetLogTracingCategory[] = "netlog"; |
32 | 32 |
33 struct TraceEntryInfo { | 33 struct TraceEntryInfo { |
34 std::string category; | 34 std::string category; |
35 std::string id; | 35 std::string id; |
36 std::string phase; | 36 std::string phase; |
37 std::string name; | 37 std::string name; |
38 std::string source_type; | 38 std::string source_type; |
39 }; | 39 }; |
40 | 40 |
41 TraceEntryInfo GetTraceEntryInfoFromValue(const base::DictionaryValue& value) { | 41 TraceEntryInfo GetTraceEntryInfoFromValue(const base::DictionaryValue& value) { |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 EXPECT_TRUE(item1->GetString("args.params.foo", &item1_params)); | 369 EXPECT_TRUE(item1->GetString("args.params.foo", &item1_params)); |
370 EXPECT_EQ("bar", item1_params); | 370 EXPECT_EQ("bar", item1_params); |
371 | 371 |
372 EXPECT_TRUE(item2->GetString("args.params", &item2_params)); | 372 EXPECT_TRUE(item2->GetString("args.params", &item2_params)); |
373 EXPECT_TRUE(item2_params.empty()); | 373 EXPECT_TRUE(item2_params.empty()); |
374 } | 374 } |
375 | 375 |
376 } // namespace | 376 } // namespace |
377 | 377 |
378 } // namespace net | 378 } // namespace net |
OLD | NEW |