Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/in_flight_io.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/disk_cache/in_flight_io.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698