summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/shell_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Make delegate_execute GetLaunchMode() check for default browser.zturner@chromium.org2014-03-071-0/+5
| | | | | | | | BUG=350078 Review URL: https://codereview.chromium.org/189113002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255562 0039d316-1c4b-4281-b951-d872f2087c98
* Reland again the patch "Manual profile reset: shortcuts on Windows" ↵vasilii@chromium.org2014-01-271-0/+21
| | | | | | | | | | | | | (https://codereview.chromium.org/137533010). It was reverted in https://codereview.chromium.org/146073004 because ProfileSettingsResetWebUITest.testOpenProfileSettingsReset timed out again. This time I propagate CancellationFlag down to the lower layer. Thus, the whole task can be cancelled faster. BUG=324931 TBR=jyasskin@chromium.org, dbeam@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/145503007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247226 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 246705 "This is a modified https://codereview.chromium.or..."akalin@chromium.org2014-01-241-12/+0
| | | | | | | | | | | | | | | | | This may be causing testOpenProfileSettingsReset to timeout. > This is a modified https://codereview.chromium.org/116143003/. The original patch was reverted (https://codereview.chromium.org/134873009) because enumerating shortcuts on the FILE thread was a huge task and it wasn't cancelled on browser shutdown. Now it's cancelable. The task is cancelled if the corresponding ResettableSettingsSnapshot destroyed. It happens if user closes chrome://settings tab. > > BUG=324931 > TBR=jyasskin@chromium.org > > Review URL: https://codereview.chromium.org/137533010 TBR=vasilii@chromium.org Review URL: https://codereview.chromium.org/146073004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246743 0039d316-1c4b-4281-b951-d872f2087c98
* This is a modified https://codereview.chromium.org/116143003/. The original ↵vasilii@chromium.org2014-01-231-0/+12
| | | | | | | | | | | patch was reverted (https://codereview.chromium.org/134873009) because enumerating shortcuts on the FILE thread was a huge task and it wasn't cancelled on browser shutdown. Now it's cancelable. The task is cancelled if the corresponding ResettableSettingsSnapshot destroyed. It happens if user closes chrome://settings tab. BUG=324931 TBR=jyasskin@chromium.org Review URL: https://codereview.chromium.org/137533010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246705 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 244708 "Manual profile reset: reset shortcuts on Windows."pauljensen@chromium.org2014-01-141-12/+0
| | | | | | | | | | | | | | | | Looks like it causes ProfileSettingsResetWebUITest.testOpenProfileSettingsReset to fail most of the time. > Manual profile reset: reset shortcuts on Windows. > > BUG=324931 > > Review URL: https://codereview.chromium.org/116143003 TBR=vasilii@chromium.org Review URL: https://codereview.chromium.org/134873009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244766 0039d316-1c4b-4281-b951-d872f2087c98
* Manual profile reset: reset shortcuts on Windows.vasilii@chromium.org2014-01-141-0/+12
| | | | | | | | BUG=324931 Review URL: https://codereview.chromium.org/116143003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244708 0039d316-1c4b-4281-b951-d872f2087c98
* During the self-destruct flow (user-level Chrome being replaced by ↵huangs@chromium.org2014-01-081-6/+8
| | | | | | | | | | | | | | | | | | | | system-level Chrome), existing code to retarget shortcuts failed to update icon executables. This CL fixes this. The heuristics are summarized below: 1. Only considering shortcuts with parameters . 2. Shortcuts whose icon file == old target (user-level chrome.exe) gets updated to new target (system-level chrome.exe). 3. Shortcut index is kept same as before. (1) lets us delete user-level (pure) Chrome shortcut since system-level Chrome shortcut is already present. (2) lets us select migrate App Launcher shortcut (points to chrome.exe), without changing app shortcuts (points to fixed .ico files). (3) prevents App Launcher shortcut from mutating into Chrome shortcut (it assumes icon resources enumeration don't change. To make (2) and (3) possible, we need to read the icon file and icon index. This is done by generalizing ResolveShortcut() to ResolveShortcutProperties(). The new logic requires a new flow in ShellUtils, and no longer uses the UpdateShortcutsWithArgs() flow. BUG=326562 Review URL: https://codereview.chromium.org/108193019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243642 0039d316-1c4b-4281-b951-d872f2087c98
* Add base:: to string16s in chrome/.dbeam@chromium.org2013-12-201-37/+42
| | | | | | | | | TBR=sky@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/94013004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242048 0039d316-1c4b-4281-b951-d872f2087c98
* We want the Applications Menu shortcut paths to be managed by shell_util.cc ascalamity@chromium.org2013-12-041-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this will allow the uninstaller to clean up shortcuts. BrowserDistribution now provides the name of a distribution-specific Chrome app subfolder, and ShellUtil's utility functions can now create, update, and remove shortcuts therein. This CL introduces some structural changes: -ShellIntegration::ShortcutLocations now uses an enum to specify the Applications Menu location rather than a string. The enum consists of the root of the applications menu, the "Google Chrome" subdirectory and the "Chrome Apps" subdirectory. -ShellUtil::ShortcutLocation has the equivalent locations which are implemented by ShellUtil::GetShortcutPath(). -BrowserDistribution::GetStartMenuShortcutSubfolder() now supports SUBFOLDER_APPS. This CL can be supplementally tested by running setup_unittests. This began a rework of https://codereview.chromium.org/13940006/ for gab@'s post-commit comments. BUG=233434,238895 TEST=setup_unittests.exe, installer_util_unittests.exe Review URL: https://codereview.chromium.org/13864015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238648 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 232825 "Adds the concept of a 'safe mode' hotkey start"zturner@chromium.org2013-11-081-11/+1
| | | | | | | | | | | | | | | | | | | | | | > Adds the concept of a 'safe mode' hotkey start > > The issue is that with Aura if something goes horribly wrong with the GPU, the user can get a 'black window' with no UI. > > So for ConOps it is nice to have a way to start chrome with a set of flags that we know should get you a working chrome that they can troubleshoot. > > To do this we add a hotkey combo to the start menu shortcut, in this case ctrl-shift-f10 which is not taken by windows. This shortcut can start chrome in this safe mode. > > BUG=271719 > TEST=see bug > R=robertshield@chromium.org > > Review URL: https://codereview.chromium.org/57173002 TBR=cpu@chromium.org Review URL: https://codereview.chromium.org/58853008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234023 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the concept of a 'safe mode' hotkey startcpu@chromium.org2013-11-041-1/+11
| | | | | | | | | | | | | | | | The issue is that with Aura if something goes horribly wrong with the GPU, the user can get a 'black window' with no UI. So for ConOps it is nice to have a way to start chrome with a set of flags that we know should get you a working chrome that they can troubleshoot. To do this we add a hotkey combo to the start menu shortcut, in this case ctrl-shift-f10 which is not taken by windows. This shortcut can start chrome in this safe mode. BUG=271719 TEST=see bug R=robertshield@chromium.org Review URL: https://codereview.chromium.org/57173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232825 0039d316-1c4b-4281-b951-d872f2087c98
* Restricting scope of ShellUtil's shortcut update feature for its specific ↵huangs@chromium.org2013-09-131-5/+4
| | | | | | | | | | | | | | | | usage in Chrome self-destruct flow. This is a follow-up to https://chromiumcodereview.appspot.com/22382007/ , to implement gab@'s suggested changes. Details: - Renaming ShellUtil::UpdateShortcuts() to ShellUtil::UpdateShortcuts() to UpdateShortcutsWithArgs(). - Removing the |require_args| from the interface of ShellUtil::UpdateShortcuts() (always set to true). - Change is propagated to caller in uninstall.cc. - Update to tests. BUG=235857 Review URL: https://chromiumcodereview.appspot.com/23581012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223173 0039d316-1c4b-4281-b951-d872f2087c98
* Give SxS distribution its own registration GUIDs.zturner@chromium.org2013-09-131-6/+0
| | | | | | | | | | | | | See the linked bug for more information about this change. BUG=273248 gab: chrome/installer/* ananta, cpu: win8/ Review URL: https://chromiumcodereview.appspot.com/23258005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222987 0039d316-1c4b-4281-b951-d872f2087c98
* On user-level Chrome self-destruct, make user-created shortcuts target ↵huangs@chromium.org2013-09-051-4/+7
| | | | | | | | | | | | | | | | | system-level chrome.exe. The old behavior was to delete all the shortcuts, which is rather user-hostile. With this change, the user-created shortcuts will be made to target the new system-level Chrome, to form a better transition experience. - To determine whether or not a shortcut (to the user-level chrome.exe) is user-created, the heuristic we use is to test that the arguments of the shortcut are empty. - The default shortcut to user-level chrome.exe is NOT retargeted, so it would get deleted (thus avoiding duplicate shortcut to the system-level Chrome). Right now the "Chrome Apps" is not handled. This is a similar issue as http://crbug.com/238895 , and should be handled in a different CL. BUG=235857 Review URL: https://chromiumcodereview.appspot.com/22382007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221343 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor of BrowserDistribution.calamity@chromium.org2013-08-141-1/+1
| | | | | | | | | | | | | | | | | | | This is a precursor to https://codereview.chromium.org/13864015/. * Added GetStartMenuShortcutSubfolder, which returns the Start Menu subfolder path for a given subfolder. * GetShortcutName and GetIconIndex now return data specific to a type of shortcut (browser, alternate name of browser, or app launcher). * GetDisplayName is now used rather than GetAppShortcutName where a localized name is needed (e.g., in logs and the registry). BUG=233434,238895,161985 Review URL: https://chromiumcodereview.appspot.com/15255004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217469 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in chrome/installer/, part 2.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16421004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205431 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring installer shortcut deletion; adding dedicated shortcut update ↵gab@chromium.org2013-05-061-23/+28
| | | | | | | | | | | | | | | | | | | | | | | feature. In ShellUtil, there were 3 shortcut removal routines. Changes: RemoveShortcut() => Renamed to RemoveShortcuts(), also ridding |shortcut_name| parameter (removed 1 caller that was redundant to start with). RemoveTaskbarShortcuts() => Absorbed by RemoveShortcut() RemoveStartScreenShortcuts() => Absorbed by RemoveShortcut() We want to also add an "update" feature to enable batch shortcut udpate, e.g., change all shortcuts that point to app_host.exe to point to chrome.exe instead, with the proper icon changes. To unify both operations, we create a BatchShortcutAction() that takes callbacks to perform specific operations (removal / update). ShellUtil::GetShortcutPath() is also refactored to accept more locations. The added routine in ShellUtil is: UpdateShortcuts() BUG=234876 R=gab@chromium.org, grt@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/14287008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198514 0039d316-1c4b-4281-b951-d872f2087c98
* Add file association for .webp to Chrome.skonig@chromium.org2013-04-301-2/+7
| | | | | | | | | | | This CL will enable Chrome to be a registered handler for .webp files on Windows. BUG=234275 Review URL: https://chromiumcodereview.appspot.com/14021010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197423 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Move FilePath->base::FilePathbrettw@chromium.org2013-02-111-6/+6
| | | | | | Review URL: https://codereview.chromium.org/12213104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181663 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure profile shortcut manager does not create a user level shortcut ↵asvitkine@chromium.org2013-01-161-2/+2
| | | | | | | | | | | when a system level one exists. BUG=169495 TEST=New unit tests and manual steps described in the bug. Review URL: https://chromiumcodereview.appspot.com/11876027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177256 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Remove desktop profile shortcuts (and any others pointing to the ↵asvitkine@chromium.org2013-01-041-9/+9
| | | | | | | | | | | | | exe) on uninstall. This is a re-land of https://codereview.chromium.org/11693010/, which failed on the tree on XP bots. The issue was that ProgramCompare::Evaluate() was parsing its value parameter is a command-line, which meant it was truncating it at the first space. This updated CL adds an EvaluatePath() function that takes a FilePath and doesn't try to parse it as a command-line. BUG=146636 TEST=Uninstalling Chrome removes any present profile shortcuts on the desktop. Review URL: https://chromiumcodereview.appspot.com/11743022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175104 0039d316-1c4b-4281-b951-d872f2087c98
* [Fixit-Dec-2012] Keep old shortcut's arguments when replacing an existing ↵gab@chromium.org2013-01-031-0/+2
| | | | | | | | | | | | | shortcut and not specifying any arguments for the new shortcut. R=robertshield@chromium.org BUG=146471 TEST=base_unittests --gtest_filter=ShortcutTest.* (hard to test locally as an over-install of the same version triggers a repair install which uses SHORTCUT_CREATE_ALWAYS -- I'll setup an old dev-channel and wait for it to autoupdate to the new one once this lands...). Review URL: https://chromiumcodereview.appspot.com/11740014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175008 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 174893 - Windows: Remove desktop profile shortcuts (and any others ↵eroman@chromium.org2013-01-031-9/+9
| | | | | | | | | | | | | | pointing to the exe) on uninstall. BUG=146636 TEST=Uninstalling Chrome removes any present profile shortcuts on the desktop. Review URL: https://chromiumcodereview.appspot.com/11693010 TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/11748010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174908 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Remove desktop profile shortcuts (and any others pointing to the ↵asvitkine@chromium.org2013-01-031-9/+9
| | | | | | | | | | | exe) on uninstall. BUG=146636 TEST=Uninstalling Chrome removes any present profile shortcuts on the desktop. Review URL: https://chromiumcodereview.appspot.com/11693010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174893 0039d316-1c4b-4281-b951-d872f2087c98
* Add a UMA stat to track whether Chrome is the default browser.robertshield@chromium.org2012-12-111-1/+1
| | | | | | | | | | | | Also alter the default browser enum in ShellIntegration to be compatible with UMA, and shorten needlessly-long enum value names. BUG=164653 TEST=NONE Review URL: https://chromiumcodereview.appspot.com/11472007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172346 0039d316-1c4b-4281-b951-d872f2087c98
* Add default icon to app_host.exe, and use it in shortcuts during installation.huangs@chromium.org2012-11-201-6/+3
| | | | | | | | | BUG=151626 TBR=ben@ Review URL: https://chromiumcodereview.appspot.com/11359133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168722 0039d316-1c4b-4281-b951-d872f2087c98
* Do not go through interactive-make-default flow if we are already default ↵gab@chromium.org2012-11-091-6/+8
| | | | | | | | | | | | | | browser. BUG=158100 TEST=Make sure good-old first run flow works. If first run window pops, but we are made default in between that and clicking "Next"; make sure that clicking "Next" goes straight to Chrome (but also registers XPstyle default registrations). R=grt TBR=thakis Review URL: https://chromiumcodereview.appspot.com/11312131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166834 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring shortcut creation code in ShellUtil.huangs@chromium.org2012-11-071-48/+47
| | | | | | | | | | | | | | | | | | | | | | | - Renamed: - Chrome - ChromeShortcutProperties => ShellUtil::ShortcutProperties - ChromeShortcutOperation => ShellUtil::ShortcutOperation - ChromeShortcutLocation => ShellUtil::ShortcutLocation - Constants in ShellUtil::ShortcutOperation and ShellUtil::ChromeShortcutLocation are prefixed by "SHELL_". - Subroutine renames. - For Chrome, default values are set early on, rather than injected when translating from ShellUtil::ShortcutProperties to the base version. - Need corresponding change in tests. - In Product / ProductOperations, added AddDefaultShortcutProperties(). BUG=151626 R=erikwright,gab TBR=brettw Review URL: https://chromiumcodereview.appspot.com/11360095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166512 0039d316-1c4b-4281-b951-d872f2087c98
* Re-commit: Introduce RemoveChromeTaskbarShortcuts() to delete all ↵gab@chromium.org2012-11-061-0/+7
| | | | | | | | | | | | | | pinned-to-taskbar shortcuts owned by the uninstalled Chrome. Original commit http://crrev.com/165505 Reverted in http://crrev.com/165524 BUG=158632 TEST=No user-level shortcut Chrome left behind in taskbar post user-level self-destruct. Review URL: https://chromiumcodereview.appspot.com/11368040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166285 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 165505 - Introduce RemoveChromeTaskbarShortcuts() to delete all ↵gab@chromium.org2012-11-011-7/+0
| | | | | | | | | | | | | | | | pinned-to-taskbar shortcuts owned by the uninstalled Chrome. TBR=brettw@chromium.org BUG=158632 TEST=No user-level shortcut Chrome left behind in taskbar post user-level self-destruct. Review URL: https://chromiumcodereview.appspot.com/11361015 TBR=gab@chromium.org Review URL: https://codereview.chromium.org/11366047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165524 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce RemoveChromeTaskbarShortcuts() to delete all pinned-to-taskbar ↵gab@chromium.org2012-11-011-0/+7
| | | | | | | | | | | | | shortcuts owned by the uninstalled Chrome. TBR=brettw@chromium.org BUG=158632 TEST=No user-level shortcut Chrome left behind in taskbar post user-level self-destruct. Review URL: https://chromiumcodereview.appspot.com/11361015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165505 0039d316-1c4b-4281-b951-d872f2087c98
* Only remove Chrome shortcut if it points to the chrome.exe being uninstalled.gab@chromium.org2012-10-231-1/+5
| | | | | | | | | | | R=robertshield@chromium.org BUG=148539 TEST=Install/uninstall user/system-level Chrome and verify that shortctus get properly deleted. Review URL: https://chromiumcodereview.appspot.com/11231008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163644 0039d316-1c4b-4281-b951-d872f2087c98
* Expose PKEY in shortcut.cc instead of having another layer in win_util.cc.gab@chromium.org2012-10-181-1/+1
| | | | | | | | | | | | | | Discovered while writing a fix to add PKEY_AppUserModel_PreventPinning for http://crbug.com/142980 that adding new properties was kind of redundant, so I removed one layer of unecessary calls; while I don't need to commit this change anymore (as it doesn't work...), here is the code cleanup part of it. Fix has_dual_mode() enum typo. R=robertshield@chromium.org BUG=None Review URL: https://chromiumcodereview.appspot.com/11202002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162583 0039d316-1c4b-4281-b951-d872f2087c98
* Fix dumb uncaught mistake after I switched IsChromeDefault() from bool to ↵gab@chromium.org2012-10-161-4/+5
| | | | | | | | | | | | | enum return value. Renamed methods to make it more obvious to the callers next-time. TBR=thakis@chromium.org R=grt@chromium.org BUG=154806 TEST=Prompt with greg dialog, but keep IE default, HKCR\.htm should remain "htmlfile" not "ChromeHTML...". Review URL: https://codereview.chromium.org/11184005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162161 0039d316-1c4b-4281-b951-d872f2087c98
* Move "default for protocol" probing logic out of shell_integration_win.cc ↵gab@chromium.org2012-10-151-0/+13
| | | | | | | | | | | | | | into shell_util.cc. This will allow us to probe for default from the installer (as the installer cannot otherwise call chrome code); this is already the way it is factored to "make Chrome default" and now will be factored the same way for "is Chrome default". BUG=154806 TEST=Chrome knows whether it's default or not. Review URL: https://chromiumcodereview.appspot.com/11127002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161948 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ShellUtil shortcut code -- single multi-purpose methods as opposed ↵gab@chromium.org2012-10-051-121/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to many slighlty different methods. Merge Quick Launch + Desktop logic into same call and add start menu shortcut logic in the mix too. Make properties based API (like the one introduced in base/win/shortcut.h) with default values to simplify call sites who just want to create a basic Chrome shortcut. shell_util.h: (CreateChromeDesktopShortcut, CreateChromeQuickLaunchShortcut, UpdateChromeShortcut) => CreateOrUpdateChromeShortcut (GetDesktopPath, GetQuickLaunchPath) => GetShortcutPath (GetChromeShortcutName) => ChromeShortcutProperties::set_shortcut_name() (i.e. default name is GetAppShortcutName() unless set otherwise... special profile shortcut appending logic moved to ProfileShortcutManager::GetShortcutNameForProfile). (RemoveChromeDesktopShortcut, RemoveChromeDesktopShortcutsWithAppendedNames) => RemoveChromeShortcut install.h: (CreateOrUpdateStartMenuAndTaskbarShortcuts, CreateOrUpdateDesktopAndQuickLaunchShortcuts) => CreateOrUpdateShortcuts (and incorporate some of the logic previously handled directly in InstallOrUpdateProduct()). Finally thoroughly tests shell_util and install shortcut methods! BUG=148539 TEST=Install chrome at user and system level with and without create_all_shortcuts master pref and make sure it works as intended in all scenarios. installer_util_unittests.exe --gtest_filter=ShellUtilShortcutTest* setup_unittests.exe --gtest_filter=InstallShortcutTest* unit_tests.exe --gtest_filter=ProfileShortcutManagerTest* Review URL: https://chromiumcodereview.appspot.com/10836247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160284 0039d316-1c4b-4281-b951-d872f2087c98
* Enable EULA dialog to be shown from metro Chrome.robertshield@chromium.org2012-09-261-1/+1
| | | | | | | | | | BUG=131033 TEST=Run Chrome in Metro mode while the EULA dialog still needs to be accepted. Get kicked back to the desktop to accept the dialog. On accept, get kicked back into metro mode. Review URL: https://chromiumcodereview.appspot.com/10837222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158797 0039d316-1c4b-4281-b951-d872f2087c98
* Fix registerProtocolHandler OS registration on Windows 8benwells@chromium.org2012-09-251-0/+12
| | | | | | | | | | | | On Windows 8 to register as the default handler for a protocol you need to go through a Windows shell UI flow, it cannot be done anymore via the IApplicationAssociationRegistration interface. BUG=150850 TEST=Ensure gmail and other protocol handlers can be registered successfully on Windows 7 and 8. Review URL: https://chromiumcodereview.appspot.com/10963004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158612 0039d316-1c4b-4281-b951-d872f2087c98
* Fix and re-commit http://codereview.chromium.org/10914109/ (after revert in ↵gab@chromium.org2012-09-121-10/+0
| | | | | | | | | | | | | | | | | | | | | | | http://crrev.com/155918) -- Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method. Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters). The same concept will be used for ShellUtil's shortcut functions in an upcoming CL. Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available). I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less. This is the 1st CL of a massive refactoring effort for shortcuts (http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored (http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods. TBR=robertshield@chromium.org, sky@chromium.org, agl@chromium.org, dgrogan@chromium.org BUG=132825, 148539 TEST=base_unittests --gtest_filter=FileUtilShortcutTest* installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist* unit_tests --gtest_filter=ProfileShortcutManagerTest* (run tests on XP as well) Review URL: https://chromiumcodereview.appspot.com/10909171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156250 0039d316-1c4b-4281-b951-d872f2087c98
* installer_util_unittests has failed on XP Tests (dbg)(1) since this landeddgrogan@chromium.org2012-09-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Revert 155869 - Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method. Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters). The same concept will be used for ShellUtil's shortcut functions in an upcoming CL. Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available). I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less. This is the 1st CL of a massive refactoring effort for shortcuts (http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored (http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods. BUG=132825 TEST=base_unittests --gtest_filter=FileUtilShortcutTest* installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist* unit_tests --gtest_filter=ProfileShortcutManagerTest* Review URL: https://chromiumcodereview.appspot.com/10914109 TBR=gab@chromium.org Review URL: https://chromiumcodereview.appspot.com/10910183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155918 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring and tests for the highly undertested ↵gab@chromium.org2012-09-101-10/+0
| | | | | | | | | | | | | | | | | | | | | | file_util::CreateOrUpdateShortcutLink() method. Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters). The same concept will be used for ShellUtil's shortcut functions in an upcoming CL. Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available). I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less. This is the 1st CL of a massive refactoring effort for shortcuts (http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored (http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods. BUG=132825 TEST=base_unittests --gtest_filter=FileUtilShortcutTest* installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist* unit_tests --gtest_filter=ProfileShortcutManagerTest* Review URL: https://chromiumcodereview.appspot.com/10914109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155869 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Chrome's secondary tiles on Windows 8 when uninstalling.benwells@chromium.org2012-08-301-0/+4
| | | | | | | | | | | The Windows secondary tiles deletion functions are only available to Chrome itself when running in metro mode. To get around this, the folder containing the installation's secondarty tiles is removed entirely. BUG=140559 Review URL: https://chromiumcodereview.appspot.com/10876057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154103 0039d316-1c4b-4281-b951-d872f2087c98
* Sharing shell_util_unittest code to verify shortcuts for creation of profile ↵hallielaine@chromium.org2012-08-101-0/+18
| | | | | | | | | | | shortcuts for Windows. profile_manager_unittest needs to be able to verify shortcuts created as well. BUG=NONE TEST=installer_util_unittests --gtest_filter=ShellUtilTest* Review URL: https://chromiumcodereview.appspot.com/10826188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151091 0039d316-1c4b-4281-b951-d872f2087c98
* Register Chrome in Open With... for File Associations at install on Windows.gab@chromium.org2012-08-071-0/+3
| | | | | | | | | | | | | | | | Refactor shell_util.cc to use ScopedVector<RegistryEntry> instead of std::list<RegistryEntry*> BUG=139597 TEST=Chrome shows up in the Open With context menu immediately post-install (not after first-run/make default). Make sure App Paths still work (i.e. launch "chrome.exe" from Run dialog). For the OpenWith test (say you're testing OpenWith for .htm files), make sure that you delete Chrome ProgIds from: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\OpenWithProgids (they are automatically copied there by Windows so if you have previously installed Chrome on this machine and made it default at least once Windows will have picked this up already). Review URL: https://chromiumcodereview.appspot.com/10823178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150234 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor CreateOrUpdateChromeShortcuts() for a better public API.gab@chromium.org2012-07-061-4/+6
| | | | | | | | | | | | | This is necessary as the follow-up patches will need a clean way to call CreateOrUpdateChromeShortcuts() while knowing the outcome which was kind of vague before (and would have required passing in a fake InstallStatus to simulate the desired behaviour...). BUG=132825, 127544, 131415 TEST=Install Chrome at user and system-level with and without create_all_shortcuts and verify that shortcut creation is as expected. Over-install this custom installer over chrome-dev after having deleted its shortcuts and verify they are not recreated. Review URL: https://chromiumcodereview.appspot.com/10692034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145609 0039d316-1c4b-4281-b951-d872f2087c98
* Use a better registration suffix that will always be unique while respecting ↵gab@chromium.org2012-07-061-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | the MSDN rules (2nd try). The suffix will now be the base32 encoding of the md5 hash of the user's username. This is always unique and can be determined many times deterministically without I/O access (as opposed to other methods we considered). It respects all MSDN constraints for properties onto which it is appended. This replaces the prior-style username suffixes for new installs. Old-style suffixes (i.e. unsuffixed and username suffixed) will however be kept as is through future updates. Design doc: https://docs.google.com/a/chromium.org/document/d/1qmcV3uYBh3JwvXhYkI7asg0nN7KfVMWVOzND4p0jQ3E/edit Note: This is the continuation of http://codereview.chromium.org/10617002/ which was reverted in https://chromiumcodereview.appspot.com/10667006/ BUG=133810, 133173 TEST= http://goo.gl/ZZ7gE installer_util_unittests.exe --gtest_filter=ShellUtilTest.* Review URL: https://chromiumcodereview.appspot.com/10662052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145596 0039d316-1c4b-4281-b951-d872f2087c98
* Add the opennewwindow verb to the list of verbs created with a ↵ananta@chromium.org2012-07-031-0/+3
| | | | | | | | | | | | | | | DelegateExecute handler under the Metro Chrome HKCR\<Chrome>/Chromium key. This is needed for the opennewwindow operation on the chrome metro tile to work correctly. This fix only ensures that metro chrome launches when we select the open new window operation on the metro tile. Other fixes are needed to ensure that subsequent open new window operations cause new tabs to get created. BUG=135122 R=gab Review URL: https://chromiumcodereview.appspot.com/10698086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145383 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 143782 - Use a better registration suffix that will always be unique ↵kbr@chromium.org2012-06-241-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | while respecting the MSDN rules. (Triggered assertion failures in browser_tests blocking WebKit rolls.) The suffix will now be the base32 encoding of the md5 hash of the user's username. This is always unique and can be determined many times deterministically without I/O access (as opposed to other methods we considered). It respects all MSDN constraint for properties onto which it is appended. This replaces the prior-style username suffixes for new installs. Old-style suffixes (i.e. unsuffixed and username suffixed) will however be kept as is through future updates. Design doc: https://docs.google.com/a/chromium.org/document/d/1qmcV3uYBh3JwvXhYkI7asg0nN7KfVMWVOzND4p0jQ3E/edit BUG=133810 TEST= http://goo.gl/ZZ7gE installer_util_unittests.exe --gtest_filter=ShellUtilTest.* Review URL: https://chromiumcodereview.appspot.com/10617002 TBR=gab@chromium.org Review URL: https://chromiumcodereview.appspot.com/10667006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143833 0039d316-1c4b-4281-b951-d872f2087c98