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

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

Issue 2034473003: [MD History] Disable MD History for supervised users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hide_search_bar
Patch Set: fix android Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/ui/webui/md_history_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 return &NewWebUI<NewTabUI>; 406 return &NewWebUI<NewTabUI>;
407 if (url.host() == chrome::kChromeUIMdSettingsHost) 407 if (url.host() == chrome::kChromeUIMdSettingsHost)
408 return &NewWebUI<settings::MdSettingsUI>; 408 return &NewWebUI<settings::MdSettingsUI>;
409 // If the material design extensions page is enabled, it gets its own host. 409 // If the material design extensions page is enabled, it gets its own host.
410 // Otherwise, it's handled by the uber settings page. 410 // Otherwise, it's handled by the uber settings page.
411 if (url.host() == chrome::kChromeUIExtensionsHost && 411 if (url.host() == chrome::kChromeUIExtensionsHost &&
412 ::switches::MdExtensionsEnabled()) { 412 ::switches::MdExtensionsEnabled()) {
413 return &NewWebUI<extensions::ExtensionsUI>; 413 return &NewWebUI<extensions::ExtensionsUI>;
414 } 414 }
415 // Material Design history is on its own host, rather than on an Uber page. 415 // Material Design history is on its own host, rather than on an Uber page.
416 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature) && 416 if (MdHistoryUI::IsEnabled(profile) &&
417 url.host() == chrome::kChromeUIHistoryHost) { 417 url.host() == chrome::kChromeUIHistoryHost) {
418 return &NewWebUI<MdHistoryUI>; 418 return &NewWebUI<MdHistoryUI>;
419 } 419 }
420 if (url.host() == chrome::kChromeUIQuotaInternalsHost) 420 if (url.host() == chrome::kChromeUIQuotaInternalsHost)
421 return &NewWebUI<QuotaInternalsUI>; 421 return &NewWebUI<QuotaInternalsUI>;
422 // Settings are implemented with native UI elements on Android. 422 // Settings are implemented with native UI elements on Android.
423 // Handle chrome://settings if settings in a window and about in settings 423 // Handle chrome://settings if settings in a window and about in settings
424 // are enabled. 424 // are enabled.
425 if (url.host() == chrome::kChromeUISettingsFrameHost || 425 if (url.host() == chrome::kChromeUISettingsFrameHost ||
426 (url.host() == chrome::kChromeUISettingsHost && 426 (url.host() == chrome::kChromeUISettingsHost &&
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 #endif 795 #endif
796 796
797 // Android doesn't use the plugins pages. 797 // Android doesn't use the plugins pages.
798 if (page_url.host() == chrome::kChromeUIPluginsHost) 798 if (page_url.host() == chrome::kChromeUIPluginsHost)
799 return PluginsUI::GetFaviconResourceBytes(scale_factor); 799 return PluginsUI::GetFaviconResourceBytes(scale_factor);
800 800
801 #endif 801 #endif
802 802
803 return NULL; 803 return NULL;
804 } 804 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/ui/webui/md_history_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698