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 "net/proxy/proxy_resolver_js_bindings.h" | 5 #include "net/proxy/proxy_resolver_js_bindings.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 if (net_log) | 292 if (net_log) |
293 net_log->AddEntry(type, phase, params); | 293 net_log->AddEntry(type, phase, params); |
294 } | 294 } |
295 | 295 |
296 void LogEventToCurrentRequestAndGlobally( | 296 void LogEventToCurrentRequestAndGlobally( |
297 NetLog::EventType type, | 297 NetLog::EventType type, |
298 scoped_refptr<NetLog::EventParameters> params) { | 298 scoped_refptr<NetLog::EventParameters> params) { |
299 LogEventToCurrentRequest(NetLog::PHASE_NONE, type, params); | 299 LogEventToCurrentRequest(NetLog::PHASE_NONE, type, params); |
300 | 300 |
301 // Emit to the global NetLog event stream. | 301 // Emit to the global NetLog event stream. |
302 if (net_log_) { | 302 if (net_log_) |
303 net_log_->AddEntry( | 303 net_log_->AddGlobalEntry(type, params); |
304 type, | |
305 base::TimeTicks::Now(), | |
306 NetLog::Source(), | |
307 NetLog::PHASE_NONE, | |
308 params); | |
309 } | |
310 } | 304 } |
311 | 305 |
312 scoped_ptr<SyncHostResolver> host_resolver_; | 306 scoped_ptr<SyncHostResolver> host_resolver_; |
313 NetLog* net_log_; | 307 NetLog* net_log_; |
314 scoped_ptr<ProxyResolverErrorObserver> error_observer_; | 308 scoped_ptr<ProxyResolverErrorObserver> error_observer_; |
315 DISALLOW_COPY_AND_ASSIGN(DefaultJSBindings); | 309 DISALLOW_COPY_AND_ASSIGN(DefaultJSBindings); |
316 }; | 310 }; |
317 | 311 |
318 } // namespace | 312 } // namespace |
319 | 313 |
320 // static | 314 // static |
321 ProxyResolverJSBindings* ProxyResolverJSBindings::CreateDefault( | 315 ProxyResolverJSBindings* ProxyResolverJSBindings::CreateDefault( |
322 SyncHostResolver* host_resolver, | 316 SyncHostResolver* host_resolver, |
323 NetLog* net_log, | 317 NetLog* net_log, |
324 ProxyResolverErrorObserver* error_observer) { | 318 ProxyResolverErrorObserver* error_observer) { |
325 return new DefaultJSBindings(host_resolver, net_log, error_observer); | 319 return new DefaultJSBindings(host_resolver, net_log, error_observer); |
326 } | 320 } |
327 | 321 |
328 } // namespace net | 322 } // namespace net |
OLD | NEW |