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

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 2824773002: Rename ScopedComPtr::get() to ScopedComPtr::Get() (Closed)
Patch Set: Update to 5293966 Created 3 years, 8 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/legacy_firewall_manager_win.cc ('k') | chrome/installer/util/wmi.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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 bool LaunchDefaultAppsSettingsModernDialog(const wchar_t* protocol) { 753 bool LaunchDefaultAppsSettingsModernDialog(const wchar_t* protocol) {
754 DCHECK(protocol); 754 DCHECK(protocol);
755 static const wchar_t kControlPanelAppModelId[] = 755 static const wchar_t kControlPanelAppModelId[] =
756 L"windows.immersivecontrolpanel_cw5n1h2txyewy" 756 L"windows.immersivecontrolpanel_cw5n1h2txyewy"
757 L"!microsoft.windows.immersivecontrolpanel"; 757 L"!microsoft.windows.immersivecontrolpanel";
758 758
759 base::win::ScopedComPtr<IApplicationActivationManager> activator; 759 base::win::ScopedComPtr<IApplicationActivationManager> activator;
760 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); 760 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager);
761 if (SUCCEEDED(hr)) { 761 if (SUCCEEDED(hr)) {
762 DWORD pid = 0; 762 DWORD pid = 0;
763 CoAllowSetForegroundWindow(activator.get(), nullptr); 763 CoAllowSetForegroundWindow(activator.Get(), nullptr);
764 hr = activator->ActivateApplication(kControlPanelAppModelId, 764 hr = activator->ActivateApplication(kControlPanelAppModelId,
765 L"page=SettingsPageAppsDefaults", 765 L"page=SettingsPageAppsDefaults",
766 AO_NONE, &pid); 766 AO_NONE, &pid);
767 if (SUCCEEDED(hr)) { 767 if (SUCCEEDED(hr)) {
768 hr = activator->ActivateApplication( 768 hr = activator->ActivateApplication(
769 kControlPanelAppModelId, 769 kControlPanelAppModelId,
770 base::StringPrintf(L"page=SettingsPageAppsDefaults&target=%ls", 770 base::StringPrintf(L"page=SettingsPageAppsDefaults&target=%ls",
771 GetTargetForDefaultAppsSettings(protocol).c_str()) 771 GetTargetForDefaultAppsSettings(protocol).c_str())
772 .c_str(), 772 .c_str(),
773 AO_NONE, &pid); 773 AO_NONE, &pid);
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 for (const auto& entry : entries) 2343 for (const auto& entry : entries)
2344 entry->AddToWorkItemList(root, items.get()); 2344 entry->AddToWorkItemList(root, items.get());
2345 2345
2346 // Apply all the registry changes and if there is a problem, rollback 2346 // Apply all the registry changes and if there is a problem, rollback
2347 if (!items->Do()) { 2347 if (!items->Do()) {
2348 items->Rollback(); 2348 items->Rollback();
2349 return false; 2349 return false;
2350 } 2350 }
2351 return true; 2351 return true;
2352 } 2352 }
OLDNEW
« no previous file with comments | « chrome/installer/util/legacy_firewall_manager_win.cc ('k') | chrome/installer/util/wmi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698