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

Unified Diff: chrome/installer/util/shell_util.h

Issue 11127002: Move "default for protocol" probing logic out of shell_integration_win.cc into shell_util.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/shell_util.h
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h
index a67a7243fb62c2564f76b264a5f2edc65a6a1431..50c49e1e80a8456c44d55268031c6f369e394acb 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -32,6 +32,13 @@ class ShellUtil {
SYSTEM_LEVEL = 0x2 // Make any shell changes only at the system level
};
+ // Chrome's default handler state for a given protocol.
+ enum DefaultState {
+ NOT_DEFAULT = 0,
grt (UTC plus 2) 2012/10/12 19:59:35 nit: remove " = 0"
gab 2012/10/12 20:35:12 This mimics the enum defined in shell_integration.
grt (UTC plus 2) 2012/10/15 13:44:33 I don't think this is necessary since they're inde
gab 2012/10/15 14:20:39 Done.
+ IS_DEFAULT,
+ UNKNOWN_DEFAULT = -1
grt (UTC plus 2) 2012/10/12 19:59:35 does this need to be -1? why not 2?
gab 2012/10/12 20:35:12 Same justification as above.
grt (UTC plus 2) 2012/10/15 13:44:33 Would you at least move this above NOT_DEFAULT and
gab 2012/10/15 14:20:39 Done.
+ };
+
// Typical shortcut directories. Resolved in GetShortcutPath().
enum ChromeShortcutLocation {
SHORTCUT_DESKTOP,
@@ -379,6 +386,12 @@ class ShellUtil {
// Windows prior to Windows 8.
static bool CanMakeChromeDefaultUnattended();
+ // Returns true if Chrome is the default handler for HTTP and HTTPS.
+ static DefaultState IsChromeDefault();
+
+ // Returns true if Chrome is the default handler for |protocol|.
+ static DefaultState IsChromeDefaultProtocolClient(const string16& protocol);
+
// Make Chrome the default browser. This function works by going through
// the url protocols and file associations that are related to general
// browsing, e.g. http, https, .html etc., and requesting to become the

Powered by Google App Engine
This is Rietveld 408576698