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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.h

Issue 1397563002: Setting chrome as the default browser is now fixed on Windows 10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 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
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/startup_browser_creator.h
diff --git a/chrome/browser/ui/startup/startup_browser_creator.h b/chrome/browser/ui/startup/startup_browser_creator.h
index 3ace91f511bafa1979f41660970ba677019aef30..6ee8067036e4ea8570401a723f54bb47dc05ed8b 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.h
+++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -103,6 +103,25 @@ class StartupBrowserCreator {
static void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
+#if defined(OS_WIN)
+ // Setting Chrome as the default browser in Windows 10+ requires a specific
+ // url to be opened through openwith.exe. This url is intercepted in
+ // ProcessCmdLineImpl when the callback is set. See DefaultBrowserWorker in
+ // shell_integration.h for more details. Only call this on the UI
+ // thread.
+ //
+ // Returns false when the default browser callback was already set which
+ // results in a no-op.
+ static bool SetDefaultBrowserCallback(const base::Closure& callback);
+
+ // Clears the callback when it isn't needed anymore. Only call this on the UI
+ // thread.
+ static void ClearDefaultBrowserCallback();
+
+ // Returns the url used to set Chrome as the default browser asynchronously.
+ static const wchar_t* GetDefaultBrowserUrl();
+#endif // defined(OS_WIN)
+
private:
friend class CloudPrintProxyPolicyTest;
friend class CloudPrintProxyPolicyStartupTest;
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698