Chromium Code Reviews| Index: chrome/installer/util/shell_util.h |
| diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h |
| index bf0f2181a6b2b067403343d8b9272e7911edbbe6..a428ffbd04e37b19dc12c688dd8d6adc91dcc5e0 100644 |
| --- a/chrome/installer/util/shell_util.h |
| +++ b/chrome/installer/util/shell_util.h |
| @@ -26,6 +26,7 @@ class BrowserDistribution; |
| namespace base { |
| class CancellationFlag; |
| +class CommandLine; |
| } |
| // This is a utility class that provides common shell integration methods |
| @@ -600,6 +601,35 @@ class ShellUtil { |
| // bytes. |
| static base::string16 ByteArrayToBase32(const uint8* bytes, size_t size); |
| + // Associates a set of file extensions with a particular application in the |
| + // Windows registry, for the current user only. If an extension has no |
| + // existing default association, the given application becomes the default. |
| + // Otherwise, the application is added to the Open With menu for this type, |
| + // but does not become the default. |
| + // |
| + // |progid| is the unique internal name Windows will use for file associations |
| + // with this application. |
| + // |command_line| is the command to execute when opening a file via this |
| + // association. It should contain "%1" to pass the filename as an argument. |
|
grt (UTC plus 2)
2014/10/01 16:28:39
should or must?
Matt Giuca
2014/10/02 09:36:34
See discussion in .cc file.
|
| + // |file_type_name| and |icon_path| are the friendly name, and the path of the |
| + // icon, respectively, that will be used for files of these types when |
| + // associated with this application by default. (They are NOT the name/icon |
| + // that will represent the application under the Open With menu.) |
| + // Returns true on success; otherwise logs to stderr and returns false. |
|
grt (UTC plus 2)
2014/10/01 16:28:39
if it uses LOG macros, it isn't going to stderr on
Matt Giuca
2014/10/02 09:36:34
Done.
|
| + static bool AddFileAssociations( |
| + const base::string16& progid, |
| + const base::CommandLine& command_line, |
| + const base::string16& file_type_name, |
| + const base::FilePath& icon_path, |
| + const std::set<base::string16>& file_extensions); |
|
grt (UTC plus 2)
2014/10/01 16:28:38
#include <set>
Matt Giuca
2014/10/02 09:36:34
Done.
|
| + |
| + // Deletes all associations with a particular application in the Windows |
| + // registry, for the current user only. |
| + // |progid| is the unique internal name Windows uses for file associations |
| + // with this application, as given to AddWindowsFileAssociations. All |
|
grt (UTC plus 2)
2014/10/01 16:28:39
AddWindowsFileAssociations -> AddFileAssociations
Matt Giuca
2014/10/02 09:36:34
Done.
|
| + // information associated with this name will be deleted. |
| + static bool DeleteFileAssociations(const base::string16& progid); |
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| }; |