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

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

Issue 10576009: Notify Windows Shell after making Chrome default interactively (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | 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 // 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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 1175
1176 if (!RegisterChromeBrowser(dist, chrome_exe, string16(), true)) 1176 if (!RegisterChromeBrowser(dist, chrome_exe, string16(), true))
1177 return false; 1177 return false;
1178 1178
1179 // On Windows 8, you can't set yourself as the default handler 1179 // On Windows 8, you can't set yourself as the default handler
1180 // programatically. In other words IApplicationAssociationRegistration 1180 // programatically. In other words IApplicationAssociationRegistration
1181 // has been rendered useless. What you can do is to launch 1181 // has been rendered useless. What you can do is to launch
1182 // "Set Program Associations" section of the "Default Programs" 1182 // "Set Program Associations" section of the "Default Programs"
1183 // control panel, which is a mess, or pop the concise "How you want to open 1183 // control panel, which is a mess, or pop the concise "How you want to open
1184 // webpages?" dialog. We choose the latter. 1184 // webpages?" dialog. We choose the latter.
1185 return LaunchSelectDefaultProtocolHandlerDialog(L"http"); 1185 bool success = LaunchSelectDefaultProtocolHandlerDialog(L"http");
1186 if (success)
1187 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
grt (UTC plus 2) 2012/06/19 03:36:24 how about moving this into LaunchSelectDefaultProt
gab 2012/06/19 04:12:13 Good call, Done.
1188 return success;
1186 } 1189 }
1187 1190
1188 bool ShellUtil::MakeChromeDefaultProtocolClient(BrowserDistribution* dist, 1191 bool ShellUtil::MakeChromeDefaultProtocolClient(BrowserDistribution* dist,
1189 const string16& chrome_exe, 1192 const string16& chrome_exe,
1190 const string16& protocol) { 1193 const string16& protocol) {
1191 if (!dist->CanSetAsDefault()) 1194 if (!dist->CanSetAsDefault())
1192 return false; 1195 return false;
1193 1196
1194 ShellUtil::RegisterChromeForProtocol(dist, chrome_exe, L"", protocol, true); 1197 ShellUtil::RegisterChromeForProtocol(dist, chrome_exe, L"", protocol, true);
1195 1198
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 chrome_exe.c_str(), 1454 chrome_exe.c_str(),
1452 shortcut.c_str(), 1455 shortcut.c_str(),
1453 chrome_path.c_str(), 1456 chrome_path.c_str(),
1454 arguments.c_str(), 1457 arguments.c_str(),
1455 description.c_str(), 1458 description.c_str(),
1456 icon_path.c_str(), 1459 icon_path.c_str(),
1457 icon_index, 1460 icon_index,
1458 dist->GetBrowserAppId().c_str(), 1461 dist->GetBrowserAppId().c_str(),
1459 ConvertShellUtilShortcutOptionsToFileUtil(options)); 1462 ConvertShellUtilShortcutOptionsToFileUtil(options));
1460 } 1463 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698