OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_net_log.h" | 5 #include "content/shell/browser/shell_net_log.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "net/base/net_log_logger.h" | 13 #include "net/base/net_log_logger.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 base::DictionaryValue* GetShellConstants() { | 19 base::DictionaryValue* GetShellConstants() { |
20 base::DictionaryValue* constants_dict = net::NetLogLogger::GetConstants(); | 20 base::DictionaryValue* constants_dict = net::NetLogLogger::GetConstants(); |
21 | 21 |
22 // Add a dictionary with client information | 22 // Add a dictionary with client information |
23 base::DictionaryValue* dict = new DictionaryValue(); | 23 base::DictionaryValue* dict = new base::DictionaryValue(); |
24 | 24 |
25 dict->SetString("name", "content_shell"); | 25 dict->SetString("name", "content_shell"); |
26 dict->SetString("command_line", | 26 dict->SetString("command_line", |
27 CommandLine::ForCurrentProcess()->GetCommandLineString()); | 27 CommandLine::ForCurrentProcess()->GetCommandLineString()); |
28 | 28 |
29 constants_dict->Set("clientInfo", dict); | 29 constants_dict->Set("clientInfo", dict); |
30 | 30 |
31 return constants_dict; | 31 return constants_dict; |
32 } | 32 } |
33 | 33 |
(...skipping 29 matching lines...) Expand all Loading... |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 ShellNetLog::~ShellNetLog() { | 66 ShellNetLog::~ShellNetLog() { |
67 // Remove the observer we own before we're destroyed. | 67 // Remove the observer we own before we're destroyed. |
68 if (net_log_logger_) | 68 if (net_log_logger_) |
69 RemoveThreadSafeObserver(net_log_logger_.get()); | 69 RemoveThreadSafeObserver(net_log_logger_.get()); |
70 } | 70 } |
71 | 71 |
72 } // namespace content | 72 } // namespace content |
OLD | NEW |