Commit b711bab1 authored by scottmg's avatar scottmg Committed by Commit bot

Remove HostDesktopType from ShowDefaultBrowserPrompt

R=sky@chromium.org
BUG=558054

Review URL: https://codereview.chromium.org/1684843002

Cr-Commit-Position: refs/heads/master@{#374730}
parent d2655218
......@@ -202,8 +202,7 @@ class CheckDefaultBrowserObserver
: public shell_integration::DefaultWebClientObserver {
public:
CheckDefaultBrowserObserver(const base::FilePath& profile_path,
bool show_prompt,
chrome::HostDesktopType desktop_type);
bool show_prompt);
~CheckDefaultBrowserObserver() override;
private:
......@@ -219,18 +218,14 @@ class CheckDefaultBrowserObserver
// True if the prompt is to be shown if Chrome is not the default browser.
bool show_prompt_;
chrome::HostDesktopType desktop_type_;
DISALLOW_COPY_AND_ASSIGN(CheckDefaultBrowserObserver);
};
CheckDefaultBrowserObserver::CheckDefaultBrowserObserver(
const base::FilePath& profile_path,
bool show_prompt,
chrome::HostDesktopType desktop_type)
: profile_path_(profile_path),
show_prompt_(show_prompt),
desktop_type_(desktop_type) {}
bool show_prompt)
: profile_path_(profile_path), show_prompt_(show_prompt) {}
CheckDefaultBrowserObserver::~CheckDefaultBrowserObserver() {}
......@@ -286,7 +281,7 @@ void RegisterDefaultBrowserPromptPrefs(PrefRegistrySimple* registry) {
prefs::kBrowserSuppressDefaultBrowserPrompt, std::string());
}
void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) {
void ShowDefaultBrowserPrompt(Profile* profile) {
// Do not check if Chrome is the default browser if there is a policy in
// control of this setting.
if (g_browser_process->local_state()->IsManagedPreference(
......@@ -322,8 +317,7 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) {
scoped_refptr<shell_integration::DefaultBrowserWorker>(
new shell_integration::DefaultBrowserWorker(
new CheckDefaultBrowserObserver(profile->GetPath(), show_prompt,
desktop_type)))
new CheckDefaultBrowserObserver(profile->GetPath(), show_prompt)))
->StartCheckIsDefault();
}
......
......@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_UI_STARTUP_DEFAULT_BROWSER_PROMPT_H_
#define CHROME_BROWSER_UI_STARTUP_DEFAULT_BROWSER_PROMPT_H_
#include "chrome/browser/ui/host_desktop.h"
class PrefRegistrySimple;
class Profile;
......@@ -15,7 +13,7 @@ namespace chrome {
void RegisterDefaultBrowserPromptPrefs(PrefRegistrySimple* registry);
// Shows a prompt UI to set the default browser if necessary.
void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type);
void ShowDefaultBrowserPrompt(Profile* profile);
// Shows a prompt UI to set the default browser on first run
// (if necessary and permitted). Returns true if the dialog has been launched.
......
......@@ -829,8 +829,7 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary(
if (!is_first_run_ ||
(browser_creator_ &&
browser_creator_->is_default_browser_dialog_suppressed())) {
chrome::ShowDefaultBrowserPrompt(profile_,
browser->host_desktop_type());
chrome::ShowDefaultBrowserPrompt(profile_);
}
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment