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 "chrome_frame/urlmon_url_request.h" | 5 #include "chrome_frame/urlmon_url_request.h" |
6 | 6 |
7 #include <urlmon.h> | 7 #include <urlmon.h> |
8 #include <wininet.h> | 8 #include <wininet.h> |
9 | 9 |
10 #include "base/callback_old.h" | 10 #include "base/callback_old.h" |
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 | 1254 |
1255 StopAllRequestsHelper(&request_map_, NULL); | 1255 StopAllRequestsHelper(&request_map_, NULL); |
1256 | 1256 |
1257 if (background_worker_thread_enabled_) { | 1257 if (background_worker_thread_enabled_) { |
1258 DCHECK(background_thread_.get()); | 1258 DCHECK(background_thread_.get()); |
1259 background_thread_->message_loop()->PostTask( | 1259 background_thread_->message_loop()->PostTask( |
1260 FROM_HERE, | 1260 FROM_HERE, |
1261 NewRunnableMethod( | 1261 NewRunnableMethod( |
1262 this, &UrlmonUrlRequestManager::StopAllRequestsHelper, | 1262 this, &UrlmonUrlRequestManager::StopAllRequestsHelper, |
1263 &background_request_map_, &background_resource_map_lock_)); | 1263 &background_request_map_, &background_resource_map_lock_)); |
1264 // background_thread_->Stop(); | |
1265 // background_thread_.reset(); | |
1266 } | 1264 } |
1267 } | 1265 } |
1268 | 1266 |
1269 void UrlmonUrlRequestManager::StopAllRequestsHelper( | 1267 void UrlmonUrlRequestManager::StopAllRequestsHelper( |
1270 RequestMap* request_map, | 1268 RequestMap* request_map, |
1271 base::Lock* request_map_lock) { | 1269 base::Lock* request_map_lock) { |
1272 DCHECK(request_map); | 1270 DCHECK(request_map); |
1273 | 1271 |
1274 DVLOG(1) << __FUNCTION__ << " stopping " << request_map->size() | 1272 DVLOG(1) << __FUNCTION__ << " stopping " << request_map->size() |
1275 << " requests"; | 1273 << " requests"; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 } | 1416 } |
1419 | 1417 |
1420 void UrlmonUrlRequestManager::ResourceFetcherThread::Init() { | 1418 void UrlmonUrlRequestManager::ResourceFetcherThread::Init() { |
1421 CoInitialize(NULL); | 1419 CoInitialize(NULL); |
1422 } | 1420 } |
1423 | 1421 |
1424 void UrlmonUrlRequestManager::ResourceFetcherThread::CleanUp() { | 1422 void UrlmonUrlRequestManager::ResourceFetcherThread::CleanUp() { |
1425 CoUninitialize(); | 1423 CoUninitialize(); |
1426 } | 1424 } |
1427 | 1425 |
OLD | NEW |