| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/dhcp_proxy_script_adapter_fetcher_win.h" | 5 #include "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h" |
| 6 | 6 |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 | 106 |
| 107 GURL DhcpProxyScriptAdapterFetcher::GetPacURL() const { | 107 GURL DhcpProxyScriptAdapterFetcher::GetPacURL() const { |
| 108 DCHECK(CalledOnValidThread()); | 108 DCHECK(CalledOnValidThread()); |
| 109 return pac_url_; | 109 return pac_url_; |
| 110 } | 110 } |
| 111 | 111 |
| 112 DhcpProxyScriptAdapterFetcher::WorkerThread::WorkerThread( | 112 DhcpProxyScriptAdapterFetcher::WorkerThread::WorkerThread( |
| 113 const base::WeakPtr<DhcpProxyScriptAdapterFetcher>& owner) | 113 const base::WeakPtr<DhcpProxyScriptAdapterFetcher>& owner) |
| 114 : owner_(owner), | 114 : owner_(owner), |
| 115 origin_loop_(base::MessageLoopProxy::CreateForCurrentThread()) { | 115 origin_loop_(base::MessageLoopProxy::current()) { |
| 116 } | 116 } |
| 117 | 117 |
| 118 DhcpProxyScriptAdapterFetcher::WorkerThread::~WorkerThread() { | 118 DhcpProxyScriptAdapterFetcher::WorkerThread::~WorkerThread() { |
| 119 } | 119 } |
| 120 | 120 |
| 121 void DhcpProxyScriptAdapterFetcher::WorkerThread::Start( | 121 void DhcpProxyScriptAdapterFetcher::WorkerThread::Start( |
| 122 const std::string& adapter_name) { | 122 const std::string& adapter_name) { |
| 123 bool succeeded = base::WorkerPool::PostTask( | 123 bool succeeded = base::WorkerPool::PostTask( |
| 124 FROM_HERE, | 124 FROM_HERE, |
| 125 NewRunnableMethod( | 125 NewRunnableMethod( |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // Return only up to the first null in case of embedded NULLs; if the | 288 // Return only up to the first null in case of embedded NULLs; if the |
| 289 // server is giving us back a buffer with embedded NULLs, something is | 289 // server is giving us back a buffer with embedded NULLs, something is |
| 290 // broken anyway. | 290 // broken anyway. |
| 291 return std::string(reinterpret_cast<const char *>(wpad_params.Data)); | 291 return std::string(reinterpret_cast<const char *>(wpad_params.Data)); |
| 292 } | 292 } |
| 293 | 293 |
| 294 return ""; | 294 return ""; |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace net | 297 } // namespace net |
| OLD | NEW |