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

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

Issue 487693002: ShellUtil: Add generic methods to add/delete Windows file associations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
gab 2014/09/12 13:32:36 Isn't there a better (more specific) directory for
Matt Giuca 2014/09/15 03:49:45 Maybe -- I wanted to make it a peer of shell_integ
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_FILE_ASSOCIATIONS_WIN_H_
6 #define CHROME_BROWSER_FILE_ASSOCIATIONS_WIN_H_
7
8 #include <set>
9 #include <string>
10
11 // This module is for manipulating per-user Windows file associations from an
12 // unprivileged process (ie, Chrome itself). For the code that establishes the
13 // machine-level associations during the Chrome installer, see
14 // chrome/installer/util/shell_util.h.
15
16 namespace base {
17 class CommandLine;
18 class FilePath;
19 }
20
21 // Associates a set of file extensions with a particular application in the
22 // Windows registry, for the current user only. If an extension has no existing
23 // default association, the given application becomes the default. Otherwise,
gab 2014/09/12 13:32:36 Again, verify your claim about grabbing default on
24 // the application is added to the Open With menu for this type, but does not
25 // become the default.
26 //
27 // |progid| is the unique internal name Windows will use for file associations
28 // with this application.
29 // |command_line| is the command to execute when opening a file via this
30 // association. It should contain "%1" to pass the filename as an argument.
31 // |file_type_name| and |icon_path| are the friendly name, and the path of the
32 // icon, respectively, that will be used for files of these types when
33 // associated with this application by default. (They are NOT the name/icon that
34 // will represent the application under the Open With menu.)
35 // Returns true on success; otherwise logs to stderr and returns false.
36 bool AddWindowsFileAssociations(const std::string& progid,
37 const base::CommandLine& command_line,
38 const std::string& file_type_name,
39 const base::FilePath& icon_path,
40 const std::set<std::string>& file_extensions);
41
42 // Deletes all associations with a particular application in the Windows
43 // registry, for the current user only.
44 // |progid| is the unique internal name Windows uses for file associations with
45 // this application, as given to AddWindowsFileAssociations. All information
46 // associated with this name will be deleted.
47 bool DeleteWindowsFileAssociations(const std::string& progid);
48
49 #endif // CHROME_BROWSER_FILE_ASSOCIATIONS_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/file_associations_win.cc » ('j') | chrome/browser/file_associations_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698