OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ |
6 #define CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Note: If the app has an installation specific suffix (e.g. on user-level | 50 // Note: If the app has an installation specific suffix (e.g. on user-level |
51 // Chrome installs), |app_name| should already be suffixed, this method will | 51 // Chrome installs), |app_name| should already be suffixed, this method will |
52 // then further suffix it with the profile id as described above. | 52 // then further suffix it with the profile id as described above. |
53 base::string16 GetAppModelIdForProfile(const base::string16& app_name, | 53 base::string16 GetAppModelIdForProfile(const base::string16& app_name, |
54 const base::FilePath& profile_path); | 54 const base::FilePath& profile_path); |
55 | 55 |
56 // Generates an application user model ID (AppUserModelId) for Chromium by | 56 // Generates an application user model ID (AppUserModelId) for Chromium by |
57 // calling GetAppModelIdForProfile() with ShellUtil::GetAppId() as app_name. | 57 // calling GetAppModelIdForProfile() with ShellUtil::GetAppId() as app_name. |
58 base::string16 GetChromiumModelIdForProfile(const base::FilePath& profile_path); | 58 base::string16 GetChromiumModelIdForProfile(const base::FilePath& profile_path); |
59 | 59 |
| 60 // Records the pinned state of the current executable into a histogram. Must be |
| 61 // called on the IO thread. |
| 62 void RecordIsPinnedToTaskbarHistogram(); |
| 63 |
60 // Migrates existing chrome taskbar pins by tagging them with correct app id. | 64 // Migrates existing chrome taskbar pins by tagging them with correct app id. |
61 // see http://crbug.com/28104 | 65 // see http://crbug.com/28104 |
62 void MigrateTaskbarPins(); | 66 void MigrateTaskbarPins(); |
63 | 67 |
64 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they | 68 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they |
65 // have the appropriate AppUserModelId. Also clears the legacy dual_mode | 69 // have the appropriate AppUserModelId. Also clears the legacy dual_mode |
66 // property from shortcuts with the default chrome app id. | 70 // property from shortcuts with the default chrome app id. |
67 // Returns the number of shortcuts migrated. | 71 // Returns the number of shortcuts migrated. |
68 // This method should not be called prior to Windows 7. | 72 // This method should not be called prior to Windows 7. |
69 // This method is only public for the sake of tests and shouldn't be called | 73 // This method is only public for the sake of tests and shouldn't be called |
70 // externally otherwise. | 74 // externally otherwise. |
71 int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, | 75 int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, |
72 const base::FilePath& path); | 76 const base::FilePath& path); |
73 | 77 |
74 // Returns the path to the Start Menu shortcut for the given Chrome. | 78 // Returns the path to the Start Menu shortcut for the given Chrome. |
75 base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); | 79 base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); |
76 | 80 |
77 } // namespace win | 81 } // namespace win |
78 } // namespace shell_integration | 82 } // namespace shell_integration |
79 | 83 |
80 #endif // CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ | 84 #endif // CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ |
OLD | NEW |