diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 23:28:05 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 23:28:05 +0000 |
commit | 79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58 (patch) | |
tree | 6d453c2698175b5a5c39206f019c0bcb1dfdc06d /chrome/browser/shell_integration.h | |
parent | 24c8eec50cd6d5d7efd9cf9a2b86b4fc4cf0d1bf (diff) | |
download | chromium_src-79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58.zip chromium_src-79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58.tar.gz chromium_src-79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58.tar.bz2 |
[Fixit-Dec-2012] Also add dual_mode to Start Menu shortcuts in MigrateChromiumShortcuts.
Restructured this code quite a bit to use the new shortcut magic.
Added tests which turned out to expose edge cases that I think weren't covered by the previous implementation (i.e. would potentially update shortcuts when unecessary -- flashing the desktop in the process -- or not do it when necessary).
BUG=142980
TEST=Pin Desktop shortcut to Start Screen or pin chrome.exe directly to the start screen via context menu.
Notice that there are now multiple shortcuts of Chrome (non-tiled; 1 for each "Pin to Start" action; upon launching Chrome those should all be merged down to one Chrome tile shortcut (not on the file system, but visually on the Start Screen itself).
Note: if you do try this; there is an intentional 15s delay before the migration kicks in to avoid delaying Chrome startup; so be patient, it will work ;)!
Review URL: https://chromiumcodereview.appspot.com/11712003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration.h')
-rw-r--r-- | chrome/browser/shell_integration.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index d230c1b..10a33dc 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -156,6 +156,17 @@ class ShellIntegration { // see http://crbug.com/28104 static void MigrateChromiumShortcuts(); + // Migrates all shortcuts in |path| which point to |chrome_exe| such that they + // have the appropriate AppUserModelId. Also makes sure those shortcuts have + // the dual_mode property set if such is requested by |check_dual_mode|. + // Returns the number of shortcuts migrated. + // This method should not be called prior to Windows 7. + // This method is only public for the sake of tests and shouldn't be called + // externally otherwise. + static int MigrateShortcutsInPathInternal(const FilePath& chrome_exe, + const FilePath& path, + bool check_dual_mode); + // Returns the path to the Start Menu shortcut for the given Chrome. static FilePath GetStartMenuShortcut(const FilePath& chrome_exe); #endif // defined(OS_WIN) |