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

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 1766273002: Convert --enable-md-history to a feature flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated the name of kMaterialDesignHistoryFeature to Fix a unit-test failure. Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/ui/webui/profiler_ui.h" 46 #include "chrome/browser/ui/webui/profiler_ui.h"
47 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" 47 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
48 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" 48 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h"
49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" 49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h"
50 #include "chrome/browser/ui/webui/signin_internals_ui.h" 50 #include "chrome/browser/ui/webui/signin_internals_ui.h"
51 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h" 51 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h"
52 #include "chrome/browser/ui/webui/sync_internals_ui.h" 52 #include "chrome/browser/ui/webui/sync_internals_ui.h"
53 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" 53 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h"
54 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" 54 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
55 #include "chrome/browser/ui/webui/version_ui.h" 55 #include "chrome/browser/ui/webui/version_ui.h"
56 #include "chrome/common/chrome_features.h"
56 #include "chrome/common/chrome_switches.h" 57 #include "chrome/common/chrome_switches.h"
57 #include "chrome/common/pref_names.h" 58 #include "chrome/common/pref_names.h"
58 #include "chrome/common/url_constants.h" 59 #include "chrome/common/url_constants.h"
59 #include "components/dom_distiller/core/dom_distiller_constants.h" 60 #include "components/dom_distiller/core/dom_distiller_constants.h"
60 #include "components/dom_distiller/core/dom_distiller_features.h" 61 #include "components/dom_distiller/core/dom_distiller_features.h"
61 #include "components/dom_distiller/core/dom_distiller_service.h" 62 #include "components/dom_distiller/core/dom_distiller_service.h"
62 #include "components/dom_distiller/core/url_constants.h" 63 #include "components/dom_distiller/core/url_constants.h"
63 #include "components/dom_distiller/webui/dom_distiller_ui.h" 64 #include "components/dom_distiller/webui/dom_distiller_ui.h"
64 #include "components/favicon/core/favicon_service.h" 65 #include "components/favicon/core/favicon_service.h"
65 #include "components/favicon_base/favicon_util.h" 66 #include "components/favicon_base/favicon_util.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 return &NewWebUI<NewTabUI>; 399 return &NewWebUI<NewTabUI>;
399 if (url.host() == chrome::kChromeUIMdSettingsHost) 400 if (url.host() == chrome::kChromeUIMdSettingsHost)
400 return &NewWebUI<settings::MdSettingsUI>; 401 return &NewWebUI<settings::MdSettingsUI>;
401 // If the material design extensions page is enabled, it gets its own host. 402 // If the material design extensions page is enabled, it gets its own host.
402 // Otherwise, it's handled by the uber settings page. 403 // Otherwise, it's handled by the uber settings page.
403 if (url.host() == chrome::kChromeUIExtensionsHost && 404 if (url.host() == chrome::kChromeUIExtensionsHost &&
404 ::switches::MdExtensionsEnabled()) { 405 ::switches::MdExtensionsEnabled()) {
405 return &NewWebUI<extensions::ExtensionsUI>; 406 return &NewWebUI<extensions::ExtensionsUI>;
406 } 407 }
407 // Material Design history is on its own host, rather than on an Uber page. 408 // Material Design history is on its own host, rather than on an Uber page.
408 if (::switches::MdHistoryEnabled() && 409 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature) &&
409 url.host() == chrome::kChromeUIHistoryHost) { 410 url.host() == chrome::kChromeUIHistoryHost) {
410 return &NewWebUI<MdHistoryUI>; 411 return &NewWebUI<MdHistoryUI>;
411 } 412 }
412 if (url.host() == chrome::kChromeUIQuotaInternalsHost) 413 if (url.host() == chrome::kChromeUIQuotaInternalsHost)
413 return &NewWebUI<QuotaInternalsUI>; 414 return &NewWebUI<QuotaInternalsUI>;
414 // Settings are implemented with native UI elements on Android. 415 // Settings are implemented with native UI elements on Android.
415 // Handle chrome://settings if settings in a window and about in settings 416 // Handle chrome://settings if settings in a window and about in settings
416 // are enabled. 417 // are enabled.
417 if (url.host() == chrome::kChromeUISettingsFrameHost || 418 if (url.host() == chrome::kChromeUISettingsFrameHost ||
418 (url.host() == chrome::kChromeUISettingsHost && 419 (url.host() == chrome::kChromeUISettingsHost &&
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 #endif 778 #endif
778 779
779 // Android doesn't use the plugins pages. 780 // Android doesn't use the plugins pages.
780 if (page_url.host() == chrome::kChromeUIPluginsHost) 781 if (page_url.host() == chrome::kChromeUIPluginsHost)
781 return PluginsUI::GetFaviconResourceBytes(scale_factor); 782 return PluginsUI::GetFaviconResourceBytes(scale_factor);
782 783
783 #endif 784 #endif
784 785
785 return NULL; 786 return NULL;
786 } 787 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698