OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/base64.h" | 5 #include "base/base64.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/net/chrome_net_log.h" | 10 #include "chrome/browser/net/chrome_net_log.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 public: | 114 public: |
115 explicit ConnectNetLogObserver(const std::string& host_port_pair) | 115 explicit ConnectNetLogObserver(const std::string& host_port_pair) |
116 : host_port_pair_(host_port_pair) { | 116 : host_port_pair_(host_port_pair) { |
117 } | 117 } |
118 | 118 |
119 ~ConnectNetLogObserver() override { | 119 ~ConnectNetLogObserver() override { |
120 } | 120 } |
121 | 121 |
122 void Attach() { | 122 void Attach() { |
123 g_browser_process->net_log()->DeprecatedAddObserver( | 123 g_browser_process->net_log()->DeprecatedAddObserver( |
124 this, net::NetLog::LOG_ALL_BUT_BYTES); | 124 this, net::NetLogCaptureMode::IncludeCookiesAndCredentials()); |
125 } | 125 } |
126 | 126 |
127 void Detach() { | 127 void Detach() { |
128 if (net_log()) | 128 if (net_log()) |
129 net_log()->DeprecatedRemoveObserver(this); | 129 net_log()->DeprecatedRemoveObserver(this); |
130 } | 130 } |
131 | 131 |
132 void WaitForConnect() { | 132 void WaitForConnect() { |
133 run_loop_.Run(); | 133 run_loop_.Run(); |
134 } | 134 } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 net_log_observer.Attach(); | 304 net_log_observer.Attach(); |
305 | 305 |
306 ui_test_utils::NavigateToURL(browser(), GURL(data_uri)); | 306 ui_test_utils::NavigateToURL(browser(), GURL(data_uri)); |
307 | 307 |
308 net_log_observer.WaitForConnect(); | 308 net_log_observer.WaitForConnect(); |
309 net_log_observer.Detach(); | 309 net_log_observer.Detach(); |
310 } | 310 } |
311 | 311 |
312 } // namespace chrome_browser_net | 312 } // namespace chrome_browser_net |
313 | 313 |
OLD | NEW |