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

Side by Side Diff: win8/delegate_execute/delegate_execute.cc

Issue 1321143002: Make GetCommandExecuteImplClsid return the CLSID as a string directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a1_no_delegate_execute_win10
Patch Set: review:grt Created 5 years, 3 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 | « chrome/installer/util/shell_util.cc ('k') | no next file » | 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 <atlbase.h> 5 #include <atlbase.h>
6 #include <atlcom.h> 6 #include <atlcom.h>
7 #include <atlctl.h> 7 #include <atlctl.h>
8 #include <initguid.h> 8 #include <initguid.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
(...skipping 28 matching lines...) Expand all
39 public : 39 public :
40 typedef ATL::CAtlExeModuleT<DelegateExecuteModule> ParentClass; 40 typedef ATL::CAtlExeModuleT<DelegateExecuteModule> ParentClass;
41 typedef CComObject<CommandExecuteImpl> ImplType; 41 typedef CComObject<CommandExecuteImpl> ImplType;
42 42
43 DelegateExecuteModule() 43 DelegateExecuteModule()
44 : registration_token_(0) { 44 : registration_token_(0) {
45 } 45 }
46 46
47 HRESULT PreMessageLoop(int nShowCmd) { 47 HRESULT PreMessageLoop(int nShowCmd) {
48 HRESULT hr = S_OK; 48 HRESULT hr = S_OK;
49 base::string16 clsid_string;
50 GUID clsid; 49 GUID clsid;
51 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 50 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
52 if (!dist->GetCommandExecuteImplClsid(&clsid_string)) 51 const base::string16 clsid_string = dist->GetCommandExecuteImplClsid();
52 if (clsid_string.empty())
53 return E_FAIL; 53 return E_FAIL;
54 hr = ::CLSIDFromString(clsid_string.c_str(), &clsid); 54 hr = ::CLSIDFromString(clsid_string.c_str(), &clsid);
55 if (FAILED(hr)) 55 if (FAILED(hr))
56 return hr; 56 return hr;
57 57
58 // We use the same class creation logic as ATL itself. See 58 // We use the same class creation logic as ATL itself. See
59 // _ATL_OBJMAP_ENTRY::RegisterClassObject() in atlbase.h 59 // _ATL_OBJMAP_ENTRY::RegisterClassObject() in atlbase.h
60 hr = ImplType::_ClassFactoryCreatorClass::CreateInstance( 60 hr = ImplType::_ClassFactoryCreatorClass::CreateInstance(
61 ImplType::_CreatorClass::CreateInstance, IID_IUnknown, 61 ImplType::_CreatorClass::CreateInstance, IID_IUnknown,
62 instance_.ReceiveVoid()); 62 instance_.ReceiveVoid());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 case DelegateExecuteOperation::RELAUNCH_CHROME: 193 case DelegateExecuteOperation::RELAUNCH_CHROME:
194 ret_code = RelaunchChrome(operation); 194 ret_code = RelaunchChrome(operation);
195 break; 195 break;
196 default: 196 default:
197 NOTREACHED(); 197 NOTREACHED();
198 } 198 }
199 } 199 }
200 AtlTrace("delegate_execute exit, code = %d\n", ret_code); 200 AtlTrace("delegate_execute exit, code = %d\n", ret_code);
201 return ret_code; 201 return ret_code;
202 } 202 }
OLDNEW
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698