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

Side by Side Diff: chrome/browser/shell_integration.h

Issue 1588733005: Reduce MigrateChromiumShortcuts to only handling taskbar pins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_gab_more_metro_cleanup
Patch Set: Created 4 years, 11 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
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 #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
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 MigrateChromiumTaskbarPins();
grt (UTC plus 2) 2016/01/14 19:51:12 wdyt of getting rid of "Chromium" here? or changin
gab 2016/01/15 02:27:22 Done.
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 legacy dual_mode property
grt (UTC plus 2) 2016/01/14 19:51:12 nit: "clears the legacy"
gab 2016/01/15 02:27:22 Done.
164 // from shortcuts that previously had it if requested by |clear_dual_mode|. 164 // 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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/shell_integration_win.cc » ('j') | chrome/browser/shell_integration_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698