| OLD | NEW |
| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 return &NewWebUI<ConstrainedHtmlUI>; | 284 return &NewWebUI<ConstrainedHtmlUI>; |
| 285 } | 285 } |
| 286 #endif | 286 #endif |
| 287 | 287 |
| 288 if (url.host() == chrome::kChromeUIPrintHost && | 288 if (url.host() == chrome::kChromeUIPrintHost && |
| 289 !g_browser_process->local_state()->GetBoolean( | 289 !g_browser_process->local_state()->GetBoolean( |
| 290 prefs::kPrintPreviewDisabled)) { | 290 prefs::kPrintPreviewDisabled)) { |
| 291 return &NewWebUI<PrintPreviewUI>; | 291 return &NewWebUI<PrintPreviewUI>; |
| 292 } | 292 } |
| 293 | 293 |
| 294 #if !defined(OS_CHROMEOS) | 294 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 295 if (url.host() == chrome::kChromeUISyncPromoHost) { | 295 if (url.host() == chrome::kChromeUISyncPromoHost) { |
| 296 // If the sync promo page is enabled then use the sync promo WebUI otherwise | 296 // If the sync promo page is enabled then use the sync promo WebUI otherwise |
| 297 // use the NTP WebUI. We don't want to return NULL if the sync promo page | 297 // use the NTP WebUI. We don't want to return NULL if the sync promo page |
| 298 // is disabled because the page can be disabled mid-flight (for example, | 298 // is disabled because the page can be disabled mid-flight (for example, |
| 299 // if sync login finishes). | 299 // if sync login finishes). |
| 300 if (SyncPromoUI::ShouldShowSyncPromo(profile)) | 300 if (SyncPromoUI::ShouldShowSyncPromo(profile)) |
| 301 return &NewWebUI<SyncPromoUI>; | 301 return &NewWebUI<SyncPromoUI>; |
| 302 else | 302 else |
| 303 return &NewWebUI<NewTabUI>; | 303 return &NewWebUI<NewTabUI>; |
| 304 } | 304 } |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 493 |
| 494 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 494 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 495 return options2::OptionsUI::GetFaviconResourceBytes(); | 495 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 496 #endif | 496 #endif |
| 497 | 497 |
| 498 if (page_url.host() == chrome::kChromeUIPluginsHost) | 498 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 499 return PluginsUI::GetFaviconResourceBytes(); | 499 return PluginsUI::GetFaviconResourceBytes(); |
| 500 | 500 |
| 501 return NULL; | 501 return NULL; |
| 502 } | 502 } |
| OLD | NEW |