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

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

Issue 1349163008: Setting chrome as the default browser is now fixed on Windows 10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test for default browser callback + comments Created 5 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 side-by-side diff with in-line comments
Download patch
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..2915e78868d44fb4c39cb52f4e90a2e322e92062 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.h
+++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -103,6 +103,21 @@ 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.
+ static bool SetDefaultBrowserCallback(const base::Closure& callback);
grt (UTC plus 2) 2015/09/28 14:31:05 please document the return value.
Patrick Monette 2015/09/28 23:46:38 Done.
+
+ // 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;

Powered by Google App Engine
This is Rietveld 408576698