diff options
author | engedy@chromium.org <engedy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 04:48:02 +0000 |
---|---|---|
committer | engedy@chromium.org <engedy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 04:48:02 +0000 |
commit | ec3b6b846e1c53881d989906e6d3234826121be5 (patch) | |
tree | 0439abbf97094f58c64752bfa2fe9c5b4aa4b997 /chrome | |
parent | e316d418b470cfc60f6219ae44d5ad64090134e6 (diff) | |
download | chromium_src-ec3b6b846e1c53881d989906e6d3234826121be5.zip chromium_src-ec3b6b846e1c53881d989906e6d3234826121be5.tar.gz chromium_src-ec3b6b846e1c53881d989906e6d3234826121be5.tar.bz2 |
Added the Profile Settings Reset sub-page of settings to url_constants.cc and builtin_provider.cc; and cleaned up accessing it from ProfileResetGlobalError.
This makes the feature reachable through the Omnibox; and allows for nicer disposition: the sub-page will open in-place when the NTP is the current tab, or in the existing settings page if one is already open.
BUG=298036
Review URL: https://codereview.chromium.org/101833002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autocomplete/builtin_provider.cc | 1 | ||||
-rw-r--r-- | chrome/browser/profile_resetter/profile_reset_global_error.cc | 10 | ||||
-rw-r--r-- | chrome/common/url_constants.cc | 1 | ||||
-rw-r--r-- | chrome/common/url_constants.h | 1 |
4 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/autocomplete/builtin_provider.cc b/chrome/browser/autocomplete/builtin_provider.cc index a2fffe3..533f117 100644 --- a/chrome/browser/autocomplete/builtin_provider.cc +++ b/chrome/browser/autocomplete/builtin_provider.cc @@ -24,6 +24,7 @@ const char* const kChromeSettingsSubPages[] = { chrome::kImportDataSubPage, chrome::kLanguageOptionsSubPage, chrome::kPasswordManagerSubPage, + chrome::kResetProfileSettingsSubPage, chrome::kSearchEnginesSubPage, chrome::kSyncSetupSubPage, #if defined(OS_CHROMEOS) diff --git a/chrome/browser/profile_resetter/profile_reset_global_error.cc b/chrome/browser/profile_resetter/profile_reset_global_error.cc index 5a2cd06..ed31929 100644 --- a/chrome/browser/profile_resetter/profile_reset_global_error.cc +++ b/chrome/browser/profile_resetter/profile_reset_global_error.cc @@ -10,19 +10,17 @@ #include "chrome/browser/profile_resetter/automatic_profile_resetter_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/global_error/global_error_service.h" #include "chrome/browser/ui/global_error/global_error_service_factory.h" #include "chrome/browser/ui/profile_reset_bubble.h" +#include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" namespace { -// The URL that leads directly to the WebUI reset dialog in the settings page. -const char kResetProfileSettingsURL[] = - "chrome://settings/resetProfileSettings"; - base::TimeDelta GetPromptDelayHistogramMaximum() { return base::TimeDelta::FromDays(7); } @@ -71,9 +69,7 @@ string16 ProfileResetGlobalError::MenuItemLabel() { } void ProfileResetGlobalError::ExecuteMenuItem(Browser* browser) { - browser->OpenURL(content::OpenURLParams( - GURL(kResetProfileSettingsURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); + chrome::ShowSettingsSubPage(browser, chrome::kResetProfileSettingsSubPage); } bool ProfileResetGlobalError::HasBubbleView() { return true; } diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index ae2c9ac..0f33337 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc @@ -304,6 +304,7 @@ const char kLanguageOptionsSubPage[] = "languages"; const char kManagedUserSettingsSubPage[] = "managedUser"; const char kManageProfileSubPage[] = "manageProfile"; const char kPasswordManagerSubPage[] = "passwords"; +const char kResetProfileSettingsSubPage[] = "resetProfileSettings"; const char kSearchEnginesSubPage[] = "searchEngines"; const char kSearchSubPage[] = "search"; const char kSearchUsersSubPage[] = "search#Users"; diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index 7bd6cc1..b7acad3 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -295,6 +295,7 @@ extern const char kLanguageOptionsSubPage[]; extern const char kManagedUserSettingsSubPage[]; extern const char kManageProfileSubPage[]; extern const char kPasswordManagerSubPage[]; +extern const char kResetProfileSettingsSubPage[]; extern const char kSearchEnginesSubPage[]; extern const char kSearchSubPage[]; extern const char kSearchUsersSubPage[]; |