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

Side by Side Diff: chrome/installer/util/shell_util.h

Issue 174194: Re-apply r23841 "During uninstall if Chrome is set as default" (Closed)
Patch Set: update for combobox model changes Created 11 years, 4 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
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file declares methods that are useful for integrating Chrome in 5 // This file declares methods that are useful for integrating Chrome in
6 // Windows shell. These methods are all static and currently part of 6 // Windows shell. These methods are all static and currently part of
7 // ShellUtil class. 7 // ShellUtil class.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
11 11
12 #include <windows.h> 12 #include <windows.h>
13 #include <map>
13 #include <string> 14 #include <string>
14 15
15 #include "base/basictypes.h" 16 #include "base/basictypes.h"
16 #include "chrome/installer/util/work_item_list.h" 17 #include "chrome/installer/util/work_item_list.h"
17 18
18 // This is a utility class that provides common shell integration methods 19 // This is a utility class that provides common shell integration methods
19 // that can be used by installer as well as Chrome. 20 // that can be used by installer as well as Chrome.
20 class ShellUtil { 21 class ShellUtil {
21 public: 22 public:
22 // Input to any methods that make changes to OS shell. 23 // Input to any methods that make changes to OS shell.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // otherwise returns false. 133 // otherwise returns false.
133 static bool GetDesktopPath(bool system_level, std::wstring* path); 134 static bool GetDesktopPath(bool system_level, std::wstring* path);
134 135
135 // Gets the Quick Launch shortcuts path for the current user and 136 // Gets the Quick Launch shortcuts path for the current user and
136 // returns it in 'path' argument. Return true if successful, otherwise 137 // returns it in 'path' argument. Return true if successful, otherwise
137 // returns false. If system_level is true this function returns the path 138 // returns false. If system_level is true this function returns the path
138 // to Default Users Quick Launch shortcuts path. Adding a shortcut to Default 139 // to Default Users Quick Launch shortcuts path. Adding a shortcut to Default
139 // User's profile only affects any new user profiles (not existing ones). 140 // User's profile only affects any new user profiles (not existing ones).
140 static bool GetQuickLaunchPath(bool system_level, std::wstring* path); 141 static bool GetQuickLaunchPath(bool system_level, std::wstring* path);
141 142
143 // Gets a mapping of all registered browser (on local machine) names and
144 // thier reinstall command (which usually sets browser as default).
145 static void GetRegisteredBrowsers(std::map<std::wstring,
146 std::wstring>* browsers);
147
142 // This function gets a suffix (user's login name) that can be added 148 // This function gets a suffix (user's login name) that can be added
143 // to Chromium default browser entry in the registry to create a unique name 149 // to Chromium default browser entry in the registry to create a unique name
144 // if there are multiple users on the machine, each with their own copy of 150 // if there are multiple users on the machine, each with their own copy of
145 // Chromium that they want to set as default browser. 151 // Chromium that they want to set as default browser.
146 // This suffix value is assigned to |entry|. The function also checks for 152 // This suffix value is assigned to |entry|. The function also checks for
147 // existence of Default Browser registry key with this suffix and 153 // existence of Default Browser registry key with this suffix and
148 // returns true if it exists. In all other cases it returns false. 154 // returns true if it exists. In all other cases it returns false.
149 static bool GetUserSpecificDefaultBrowserSuffix(std::wstring* entry); 155 static bool GetUserSpecificDefaultBrowserSuffix(std::wstring* entry);
150 156
151 // Make Chrome default browser. 157 // Make Chrome default browser.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 const std::wstring& shortcut, 215 const std::wstring& shortcut,
210 const std::wstring& description, 216 const std::wstring& description,
211 bool create_new); 217 bool create_new);
212 218
213 private: 219 private:
214 DISALLOW_COPY_AND_ASSIGN(ShellUtil); 220 DISALLOW_COPY_AND_ASSIGN(ShellUtil);
215 }; 221 };
216 222
217 223
218 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ 224 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698