OLD | NEW |
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 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ |
6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 // Generates an application user model ID (AppUserModelId) for Chromium by | 149 // Generates an application user model ID (AppUserModelId) for Chromium by |
150 // calling GetAppModelIdForProfile() with ShellUtil::GetAppId() as app_name. | 150 // calling GetAppModelIdForProfile() with ShellUtil::GetAppId() as app_name. |
151 static base::string16 GetChromiumModelIdForProfile( | 151 static base::string16 GetChromiumModelIdForProfile( |
152 const base::FilePath& profile_path); | 152 const base::FilePath& profile_path); |
153 | 153 |
154 // Get the AppUserModelId for the App List, for the profile in |profile_path|. | 154 // Get the AppUserModelId for the App List, for the profile in |profile_path|. |
155 static base::string16 GetAppListAppModelIdForProfile( | 155 static base::string16 GetAppListAppModelIdForProfile( |
156 const base::FilePath& profile_path); | 156 const base::FilePath& profile_path); |
157 | 157 |
158 // Migrates existing chrome shortcuts by tagging them with correct app id. | 158 // Migrates existing chrome taskbar pins by tagging them with correct app id. |
159 // see http://crbug.com/28104 | 159 // see http://crbug.com/28104 |
160 static void MigrateChromiumShortcuts(); | 160 static void MigrateTaskbarPins(); |
161 | 161 |
162 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they | 162 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they |
163 // have the appropriate AppUserModelId. Also clears the dual_mode property | 163 // have the appropriate AppUserModelId. Also clears the legacy dual_mode |
164 // from shortcuts that previously had it if requested by |clear_dual_mode|. | 164 // property from shortcuts with the default chrome app id. |
165 // Returns the number of shortcuts migrated. | 165 // Returns the number of shortcuts migrated. |
166 // This method should not be called prior to Windows 7. | 166 // This method should not be called prior to Windows 7. |
167 // This method is only public for the sake of tests and shouldn't be called | 167 // This method is only public for the sake of tests and shouldn't be called |
168 // externally otherwise. | 168 // externally otherwise. |
169 static int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, | 169 static int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, |
170 const base::FilePath& path, | 170 const base::FilePath& path); |
171 bool clear_dual_mode); | |
172 | 171 |
173 // Returns the path to the Start Menu shortcut for the given Chrome. | 172 // Returns the path to the Start Menu shortcut for the given Chrome. |
174 static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); | 173 static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); |
175 #endif // defined(OS_WIN) | 174 #endif // defined(OS_WIN) |
176 | 175 |
177 #if !defined(OS_WIN) | 176 #if !defined(OS_WIN) |
178 // TODO(calamity): replace with | 177 // TODO(calamity): replace with |
179 // BrowserDistribution::GetStartMenuShortcutSubfolder() once | 178 // BrowserDistribution::GetStartMenuShortcutSubfolder() once |
180 // BrowserDistribution is cross-platform. | 179 // BrowserDistribution is cross-platform. |
181 // Gets the name of the Chrome Apps menu folder in which to place app | 180 // Gets the name of the Chrome Apps menu folder in which to place app |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // Returns the histogram prefix for DefaultProtocolClientWorker. | 401 // Returns the histogram prefix for DefaultProtocolClientWorker. |
403 const char* GetHistogramPrefix() override; | 402 const char* GetHistogramPrefix() override; |
404 | 403 |
405 std::string protocol_; | 404 std::string protocol_; |
406 | 405 |
407 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 406 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); |
408 }; | 407 }; |
409 }; | 408 }; |
410 | 409 |
411 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 410 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ |
OLD | NEW |