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

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

Issue 1141073002: Minor comment and style updates for on-demand update check code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/help/version_updater_basic.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) 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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 base::win::ScopedComPtr<IGoogleUpdate3Web>* google_update) { 132 base::win::ScopedComPtr<IGoogleUpdate3Web>* google_update) {
133 if (g_google_update_factory) 133 if (g_google_update_factory)
134 return g_google_update_factory->Run(google_update); 134 return g_google_update_factory->Run(google_update);
135 135
136 // For a user-level install, update checks and updates can both be done by a 136 // For a user-level install, update checks and updates can both be done by a
137 // normal user with the UserClass. 137 // normal user with the UserClass.
138 if (!system_level_install) 138 if (!system_level_install)
139 return google_update->CreateInstance(CLSID_GoogleUpdate3WebUserClass); 139 return google_update->CreateInstance(CLSID_GoogleUpdate3WebUserClass);
140 140
141 // For a system-level install, update checks can be done by a normal user with 141 // For a system-level install, update checks can be done by a normal user with
142 // the ServiceClass. 142 // the MachineClass.
143 if (!install_update_if_possible) 143 if (!install_update_if_possible)
144 return google_update->CreateInstance(CLSID_GoogleUpdate3WebMachineClass); 144 return google_update->CreateInstance(CLSID_GoogleUpdate3WebMachineClass);
145 145
146 // For a system-level install, an update requires Admin privileges for writing 146 // For a system-level install, an update requires Admin privileges for writing
147 // to %ProgramFiles%. Elevate while instantiating the ServiceClass. 147 // to %ProgramFiles%. Elevate while instantiating the MachineClass.
148 return CoCreateInstanceAsAdmin(CLSID_GoogleUpdate3WebMachineClass, 148 return CoCreateInstanceAsAdmin(CLSID_GoogleUpdate3WebMachineClass,
149 IID_IGoogleUpdate3Web, elevation_window, 149 IID_IGoogleUpdate3Web, elevation_window,
150 google_update->ReceiveVoid()); 150 google_update->ReceiveVoid());
151 } 151 }
152 152
153 // UpdateCheckDriver ----------------------------------------------------------- 153 // UpdateCheckDriver -----------------------------------------------------------
154 154
155 // A driver that is created and destroyed on the caller's thread and drives 155 // A driver that is created and destroyed on the caller's thread and drives
156 // Google Update on another. 156 // Google Update on another.
157 class UpdateCheckDriver { 157 class UpdateCheckDriver {
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 const GoogleUpdate3ClassFactory& google_update_factory) { 726 const GoogleUpdate3ClassFactory& google_update_factory) {
727 if (g_google_update_factory) { 727 if (g_google_update_factory) {
728 delete g_google_update_factory; 728 delete g_google_update_factory;
729 g_google_update_factory = nullptr; 729 g_google_update_factory = nullptr;
730 } 730 }
731 if (!google_update_factory.is_null()) { 731 if (!google_update_factory.is_null()) {
732 g_google_update_factory = 732 g_google_update_factory =
733 new GoogleUpdate3ClassFactory(google_update_factory); 733 new GoogleUpdate3ClassFactory(google_update_factory);
734 } 734 }
735 } 735 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/help/version_updater_basic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698