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

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

Issue 2082563002: Revert of MD Settings: ... and we fixed all CHECK()-based URL crashes once and for all. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | chrome/browser/ui/webui/settings/md_settings_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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // so inject the correct DomDistillerService from chrome/. 249 // so inject the correct DomDistillerService from chrome/.
250 content::BrowserContext* browser_context = 250 content::BrowserContext* browser_context =
251 web_ui->GetWebContents()->GetBrowserContext(); 251 web_ui->GetWebContents()->GetBrowserContext();
252 dom_distiller::DomDistillerService* service = 252 dom_distiller::DomDistillerService* service =
253 dom_distiller::DomDistillerServiceFactory::GetForBrowserContext( 253 dom_distiller::DomDistillerServiceFactory::GetForBrowserContext(
254 browser_context); 254 browser_context);
255 return new dom_distiller::DomDistillerUi( 255 return new dom_distiller::DomDistillerUi(
256 web_ui, service, dom_distiller::kDomDistillerScheme); 256 web_ui, service, dom_distiller::kDomDistillerScheme);
257 } 257 }
258 258
259 #if !defined(OS_ANDROID)
260 template<>
261 WebUIController* NewWebUI<settings::MdSettingsUI>(WebUI* web_ui,
262 const GURL& url) {
263 return new settings::MdSettingsUI(web_ui, url);
264 }
265 #endif
266
267 #if defined(ENABLE_EXTENSIONS) 259 #if defined(ENABLE_EXTENSIONS)
268 // Only create ExtensionWebUI for URLs that are allowed extension bindings, 260 // Only create ExtensionWebUI for URLs that are allowed extension bindings,
269 // hosted by actual tabs. 261 // hosted by actual tabs.
270 bool NeedsExtensionWebUI(Profile* profile, const GURL& url) { 262 bool NeedsExtensionWebUI(Profile* profile, const GURL& url) {
271 if (!profile) 263 if (!profile)
272 return false; 264 return false;
273 265
274 const extensions::Extension* extension = 266 const extensions::Extension* extension =
275 extensions::ExtensionRegistry::Get(profile)->enabled_extensions(). 267 extensions::ExtensionRegistry::Get(profile)->enabled_extensions().
276 GetExtensionOrAppByURL(url); 268 GetExtensionOrAppByURL(url);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 #endif 807 #endif
816 808
817 // Android doesn't use the plugins pages. 809 // Android doesn't use the plugins pages.
818 if (page_url.host() == chrome::kChromeUIPluginsHost) 810 if (page_url.host() == chrome::kChromeUIPluginsHost)
819 return PluginsUI::GetFaviconResourceBytes(scale_factor); 811 return PluginsUI::GetFaviconResourceBytes(scale_factor);
820 812
821 #endif 813 #endif
822 814
823 return NULL; 815 return NULL;
824 } 816 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/md_settings_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698