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

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

Issue 2079233004: Add the Windows.IsPinnedToTaskbar metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small nits Created 4 years, 5 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 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
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.
gab 2016/06/30 15:28:11 Document that this must be called on the IO thread
61 void RecordIsPinnedToTaskbarHistogram();
62
60 // Migrates existing chrome taskbar pins by tagging them with correct app id. 63 // Migrates existing chrome taskbar pins by tagging them with correct app id.
61 // see http://crbug.com/28104 64 // see http://crbug.com/28104
62 void MigrateTaskbarPins(); 65 void MigrateTaskbarPins();
63 66
64 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they 67 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they
65 // have the appropriate AppUserModelId. Also clears the legacy dual_mode 68 // have the appropriate AppUserModelId. Also clears the legacy dual_mode
66 // property from shortcuts with the default chrome app id. 69 // property from shortcuts with the default chrome app id.
67 // Returns the number of shortcuts migrated. 70 // Returns the number of shortcuts migrated.
68 // This method should not be called prior to Windows 7. 71 // 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 72 // This method is only public for the sake of tests and shouldn't be called
70 // externally otherwise. 73 // externally otherwise.
71 int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, 74 int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe,
72 const base::FilePath& path); 75 const base::FilePath& path);
73 76
74 // Returns the path to the Start Menu shortcut for the given Chrome. 77 // Returns the path to the Start Menu shortcut for the given Chrome.
75 base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); 78 base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe);
76 79
77 } // namespace win 80 } // namespace win
78 } // namespace shell_integration 81 } // namespace shell_integration
79 82
80 #endif // CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ 83 #endif // CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698