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

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

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fixes Created 8 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 | Annotate | Revision Log
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/about_flags.h" 8 #include "chrome/browser/about_flags.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if (url.host() == chrome::kChromeUIInspectHost) 225 if (url.host() == chrome::kChromeUIInspectHost)
226 return &NewWebUI<InspectUI>; 226 return &NewWebUI<InspectUI>;
227 227
228 /**************************************************************************** 228 /****************************************************************************
229 * OS Specific #defines 229 * OS Specific #defines
230 ***************************************************************************/ 230 ***************************************************************************/
231 #if !defined(OS_ANDROID) 231 #if !defined(OS_ANDROID)
232 // Android uses the native download manager. 232 // Android uses the native download manager.
233 if (url.host() == chrome::kChromeUIDownloadsHost) 233 if (url.host() == chrome::kChromeUIDownloadsHost)
234 return &NewWebUI<DownloadsUI>; 234 return &NewWebUI<DownloadsUI>;
235 // Android doesn't use the Options/Options2 pages. 235 // Android doesn't use the Options pages.
236 if (url.host() == chrome::kChromeUISettingsFrameHost) 236 if (url.host() == chrome::kChromeUISettingsFrameHost)
237 return &NewWebUI<options2::OptionsUI>; 237 return &NewWebUI<options2::OptionsUI>;
238 if (url.host() == chrome::kChromeUISettingsHost)
239 return &NewWebUI<OptionsUI>;
240 // Android doesn't support print/print-preview 238 // Android doesn't support print/print-preview
241 if (url.host() == chrome::kChromeUIPrintHost && 239 if (url.host() == chrome::kChromeUIPrintHost &&
242 !g_browser_process->local_state()->GetBoolean( 240 !g_browser_process->local_state()->GetBoolean(
243 prefs::kPrintPreviewDisabled)) { 241 prefs::kPrintPreviewDisabled)) {
244 return &NewWebUI<PrintPreviewUI>; 242 return &NewWebUI<PrintPreviewUI>;
245 } 243 }
246 #endif 244 #endif
247 #if defined(OS_WIN) 245 #if defined(OS_WIN)
248 if (url.host() == chrome::kChromeUIConflictsHost) 246 if (url.host() == chrome::kChromeUIConflictsHost)
249 return &NewWebUI<ConflictsUI>; 247 return &NewWebUI<ConflictsUI>;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 if (page_url.host() == chrome::kChromeUIFlagsHost) 473 if (page_url.host() == chrome::kChromeUIFlagsHost)
476 return FlagsUI::GetFaviconResourceBytes(); 474 return FlagsUI::GetFaviconResourceBytes();
477 475
478 if (page_url.host() == chrome::kChromeUISessionsHost) 476 if (page_url.host() == chrome::kChromeUISessionsHost)
479 return SessionsUI::GetFaviconResourceBytes(); 477 return SessionsUI::GetFaviconResourceBytes();
480 478
481 if (page_url.host() == chrome::kChromeUIFlashHost) 479 if (page_url.host() == chrome::kChromeUIFlashHost)
482 return FlashUI::GetFaviconResourceBytes(); 480 return FlashUI::GetFaviconResourceBytes();
483 481
484 #if !defined(OS_ANDROID) 482 #if !defined(OS_ANDROID)
485 // Android uses the native download manager 483 // Android uses the native download manager.
486 if (page_url.host() == chrome::kChromeUIDownloadsHost) 484 if (page_url.host() == chrome::kChromeUIDownloadsHost)
487 return DownloadsUI::GetFaviconResourceBytes(); 485 return DownloadsUI::GetFaviconResourceBytes();
488 486
489 // Android doesn't use the Options/Options2 pages 487 // Android doesn't use the Options pages.
490 if (page_url.host() == chrome::kChromeUISettingsHost)
491 return OptionsUI::GetFaviconResourceBytes();
492
493 if (page_url.host() == chrome::kChromeUISettingsFrameHost) 488 if (page_url.host() == chrome::kChromeUISettingsFrameHost)
494 return options2::OptionsUI::GetFaviconResourceBytes(); 489 return options2::OptionsUI::GetFaviconResourceBytes();
495 #endif 490 #endif
496 491
497 if (page_url.host() == chrome::kChromeUIPluginsHost) 492 if (page_url.host() == chrome::kChromeUIPluginsHost)
498 return PluginsUI::GetFaviconResourceBytes(); 493 return PluginsUI::GetFaviconResourceBytes();
499 494
500 return NULL; 495 return NULL;
501 } 496 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698