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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 2946693002: Use GN buildflags and features to configure account consistency (Closed)
Patch Set: fix Created 3 years, 6 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/ui/BUILD.gn ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index fbdc0bce9fecfc4291d13fb6a83a306df7dccf35..cb9cb951dc25a96e78cbc5b60bf7328420a40ac0 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -75,6 +75,7 @@
#include "components/history/core/browser/history_types.h"
#include "components/prefs/pref_service.h"
#include "components/signin/core/common/profile_management_switches.h"
+#include "components/signin/core/common/signin_features.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/common/content_client.h"
@@ -162,7 +163,6 @@
#include "chrome/browser/ui/sync/sync_promo_ui.h"
#include "chrome/browser/ui/webui/signin/inline_login_ui.h"
#include "chrome/browser/ui/webui/signin/md_user_manager_ui.h"
-#include "chrome/browser/ui/webui/signin/signin_dice_internals_ui.h"
#include "chrome/browser/ui/webui/signin/signin_email_confirmation_ui.h"
#include "chrome/browser/ui/webui/signin/signin_error_ui.h"
#include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
@@ -191,6 +191,10 @@
#include "chrome/browser/ui/webui/app_list/start_page_ui.h"
#endif
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
+#include "chrome/browser/ui/webui/signin/signin_dice_internals_ui.h"
+#endif
+
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_web_ui.h"
#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
@@ -397,12 +401,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
extensions::ExtensionSystem::Get(profile)->extension_service()) {
return &NewWebUI<AppLauncherPageUI>;
}
- // Desktop Identity Consistency is only available on Windows, Linux and macOS.
- if (url.host() == chrome::kChromeUISigninDiceInternalsHost &&
- !profile->IsOffTheRecord() &&
- switches::IsAccountConsistencyDiceEnabled()) {
- return &NewWebUI<SigninDiceInternalsUI>;
- }
#endif // defined(OS_CHROMEOS)
// Bookmarks are part of NTP on Android.
@@ -567,6 +565,13 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
if (url.host_piece() == chrome::kChromeUIAppListStartPageHost)
return &NewWebUI<app_list::StartPageUI>;
#endif
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
+ if (url.host() == chrome::kChromeUISigninDiceInternalsHost &&
+ !profile->IsOffTheRecord() &&
+ switches::IsAccountConsistencyDiceEnabled()) {
+ return &NewWebUI<SigninDiceInternalsUI>;
+ }
+#endif
#if BUILDFLAG(ENABLE_EXTENSIONS)
if (url.host_piece() == chrome::kChromeUIExtensionsFrameHost)
return &NewWebUI<extensions::ExtensionsUI>;
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698