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

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: asvitkine comments #1 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..efd67be0239386fcef1ff81f9ad1ef106b399cf0 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.h
+++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_
#define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_
+#include <map>
#include <string>
#include <vector>
@@ -31,6 +32,7 @@ class CommandLine;
class StartupBrowserCreator {
public:
typedef std::vector<Profile*> Profiles;
+ typedef std::map<GURL, base::Callback<void(void)>> UrlFilters;
grt (UTC plus 2) 2015/09/22 18:21:48 base::Callback<void(void)> -> base::Closure
StartupBrowserCreator();
~StartupBrowserCreator();
@@ -103,6 +105,25 @@ class StartupBrowserCreator {
static void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
+ // All the filters functions should be called on the UI thread.
grt (UTC plus 2) 2015/09/22 18:21:48 comment suggestion: // Adds a filter that will e
+ // Adds a new filter that will execute the |callback| when the |url| is opened
+ // through the command line.
+ static void AddUrlFilter(const GURL& url,
+ const base::Callback<void(void)>& callback);
grt (UTC plus 2) 2015/09/22 18:21:48 base::Callback<void(void)> -> base::Closure
+
+ // Removes the filter associated the the |url|.
+ static void RemoveUrlFilter(const GURL& url);
+
+ // Returns true if at least one url filter exists.
grt (UTC plus 2) 2015/09/22 18:21:48 this doesn't look like it needs to be part of the
+ static bool HasUrlFilters();
+
+ // Executes the callback associated to the |url| filter. Returns false if the
+ // |url| isn't associated to any filters.
+ static bool ExecuteFilterCallback(const GURL& url);
grt (UTC plus 2) 2015/09/22 18:21:48 does this need to be public?
+
+ // Returns true if a filter is associated to the |url|.
+ static bool UrlFilterExists(const GURL& url);
+
private:
friend class CloudPrintProxyPolicyTest;
friend class CloudPrintProxyPolicyStartupTest;
@@ -149,6 +170,10 @@ class StartupBrowserCreator {
// StartupBrowserCreatorTest.LastUsedProfileActivated test.
static bool ActivatedProfile();
+ // Returns the map of all the url filters. This will creatE the filter if it
grt (UTC plus 2) 2015/09/22 18:21:47 creatE -> create
+ // doesn't exist.
+ static UrlFilters* GetUrlFilters();
+
// Additional tabs to open during first run.
std::vector<GURL> first_run_tabs_;

Powered by Google App Engine
This is Rietveld 408576698