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

Side by Side Diff: chrome/browser/google/google_update_win.cc

Issue 2850683002: Remove ScopedComPtr::ReceiveVoid and Add ScopedComPtrRef (Closed)
Patch Set: Created 3 years, 7 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
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/browser/google/google_update_win.h" 5 #include "chrome/browser/google/google_update_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <objbase.h> 9 #include <objbase.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // With older versions of GoogleUpdate, a system-level update requires Admin 188 // With older versions of GoogleUpdate, a system-level update requires Admin
189 // privileges. Elevate while instantiating the MachineClass. 189 // privileges. Elevate while instantiating the MachineClass.
190 hresult = CoGetClassObjectAsAdmin(elevation_window, google_update_clsid, 190 hresult = CoGetClassObjectAsAdmin(elevation_window, google_update_clsid,
191 IID_PPV_ARGS(&class_factory)); 191 IID_PPV_ARGS(&class_factory));
192 } 192 }
193 if (FAILED(hresult)) 193 if (FAILED(hresult))
194 return hresult; 194 return hresult;
195 195
196 ConfigureProxyBlanket(class_factory.Get()); 196 ConfigureProxyBlanket(class_factory.Get());
197 197
198 return class_factory->CreateInstance(nullptr, IID_PPV_ARGS(google_update)); 198 return class_factory->CreateInstance(nullptr,
199 IID_PPV_ARGS(google_update->Receive()));
199 } 200 }
200 201
201 // UpdateCheckDriver ----------------------------------------------------------- 202 // UpdateCheckDriver -----------------------------------------------------------
202 203
203 // A driver that is created and destroyed on the caller's thread and drives 204 // A driver that is created and destroyed on the caller's thread and drives
204 // Google Update on another. 205 // Google Update on another.
205 class UpdateCheckDriver { 206 class UpdateCheckDriver {
206 public: 207 public:
207 // Runs an update check on |task_runner|, invoking methods of |delegate| on 208 // Runs an update check on |task_runner|, invoking methods of |delegate| on
208 // the caller's thread to report progress and final results. 209 // the caller's thread to report progress and final results.
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 const GoogleUpdate3ClassFactory& google_update_factory) { 884 const GoogleUpdate3ClassFactory& google_update_factory) {
884 if (g_google_update_factory) { 885 if (g_google_update_factory) {
885 delete g_google_update_factory; 886 delete g_google_update_factory;
886 g_google_update_factory = nullptr; 887 g_google_update_factory = nullptr;
887 } 888 }
888 if (!google_update_factory.is_null()) { 889 if (!google_update_factory.is_null()) {
889 g_google_update_factory = 890 g_google_update_factory =
890 new GoogleUpdate3ClassFactory(google_update_factory); 891 new GoogleUpdate3ClassFactory(google_update_factory);
891 } 892 }
892 } 893 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698