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

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

Issue 10808006: Move printing.* prefs from local state to profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retired PrintPreviewUnitTestBase class. Created 8 years, 5 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"
10 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/extensions/extension_web_ui.h" 10 #include "chrome/browser/extensions/extension_web_ui.h"
12 #include "chrome/browser/history/history_types.h" 11 #include "chrome/browser/history/history_types.h"
13 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/browser/printing/print_preview_tab_controller.h" 13 #include "chrome/browser/printing/print_preview_tab_controller.h"
15 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/tab_contents/tab_contents.h" 16 #include "chrome/browser/ui/tab_contents/tab_contents.h"
18 #include "chrome/browser/ui/webui/about_ui.h" 17 #include "chrome/browser/ui/webui/about_ui.h"
19 #include "chrome/browser/ui/webui/bookmarks_ui.h" 18 #include "chrome/browser/ui/webui/bookmarks_ui.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Android does not support plugins for now. 246 // Android does not support plugins for now.
248 if (url.host() == chrome::kChromeUIPluginsHost) 247 if (url.host() == chrome::kChromeUIPluginsHost)
249 return &NewWebUI<PluginsUI>; 248 return &NewWebUI<PluginsUI>;
250 #endif 249 #endif
251 #if defined(ENABLE_EXTENSIONS) 250 #if defined(ENABLE_EXTENSIONS)
252 if (url.host() == chrome::kChromeUIExtensionsFrameHost) 251 if (url.host() == chrome::kChromeUIExtensionsFrameHost)
253 return &NewWebUI<ExtensionsUI>; 252 return &NewWebUI<ExtensionsUI>;
254 #endif 253 #endif
255 #if defined(ENABLE_PRINTING) 254 #if defined(ENABLE_PRINTING)
256 if (url.host() == chrome::kChromeUIPrintHost && 255 if (url.host() == chrome::kChromeUIPrintHost &&
257 !g_browser_process->local_state()->GetBoolean( 256 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled))
258 prefs::kPrintPreviewDisabled)) {
259 return &NewWebUI<PrintPreviewUI>; 257 return &NewWebUI<PrintPreviewUI>;
260 }
261 #endif 258 #endif
262 #if defined(OS_WIN) 259 #if defined(OS_WIN)
263 if (url.host() == chrome::kChromeUIConflictsHost) 260 if (url.host() == chrome::kChromeUIConflictsHost)
264 return &NewWebUI<ConflictsUI>; 261 return &NewWebUI<ConflictsUI>;
265 if (url.host() == chrome::kChromeUIMetroFlowHost) 262 if (url.host() == chrome::kChromeUIMetroFlowHost)
266 return &NewWebUI<SetAsDefaultBrowserUI>; 263 return &NewWebUI<SetAsDefaultBrowserUI>;
267 #endif 264 #endif
268 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) 265 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA)
269 if (url.host() == chrome::kChromeUICertificateViewerHost) 266 if (url.host() == chrome::kChromeUICertificateViewerHost)
270 return &NewWebUI<CertificateViewerUI>; 267 return &NewWebUI<CertificateViewerUI>;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 if (page_url.host() == chrome::kChromeUISettingsFrameHost) 519 if (page_url.host() == chrome::kChromeUISettingsFrameHost)
523 return options2::OptionsUI::GetFaviconResourceBytes(); 520 return options2::OptionsUI::GetFaviconResourceBytes();
524 521
525 // Android doesn't use the plugins pages. 522 // Android doesn't use the plugins pages.
526 if (page_url.host() == chrome::kChromeUIPluginsHost) 523 if (page_url.host() == chrome::kChromeUIPluginsHost)
527 return PluginsUI::GetFaviconResourceBytes(); 524 return PluginsUI::GetFaviconResourceBytes();
528 #endif 525 #endif
529 526
530 return NULL; 527 return NULL;
531 } 528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698