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

Side by Side Diff: chrome_frame/urlmon_url_request.cc

Issue 11050009: Use ScopedCOMInitializer in more places. While this doesn't always simplify code, it does mean we … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
OLDNEW
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 "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/bind.h" 10 #include "base/bind.h"
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 1448
1449 UrlmonUrlRequestManager::ResourceFetcherThread::ResourceFetcherThread( 1449 UrlmonUrlRequestManager::ResourceFetcherThread::ResourceFetcherThread(
1450 const char* name) : base::Thread(name) { 1450 const char* name) : base::Thread(name) {
1451 } 1451 }
1452 1452
1453 UrlmonUrlRequestManager::ResourceFetcherThread::~ResourceFetcherThread() { 1453 UrlmonUrlRequestManager::ResourceFetcherThread::~ResourceFetcherThread() {
1454 Stop(); 1454 Stop();
1455 } 1455 }
1456 1456
1457 void UrlmonUrlRequestManager::ResourceFetcherThread::Init() { 1457 void UrlmonUrlRequestManager::ResourceFetcherThread::Init() {
1458 CoInitialize(NULL); 1458 com_initializer_.reset(new base::win::ScopedCOMInitializer());
1459 } 1459 }
1460 1460
1461 void UrlmonUrlRequestManager::ResourceFetcherThread::CleanUp() { 1461 void UrlmonUrlRequestManager::ResourceFetcherThread::CleanUp() {
1462 CoUninitialize(); 1462 com_initializer_.reset();
1463 } 1463 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698