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

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

Issue 7256002: Multi-Profiles: New Profile Setup UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 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
« no previous file with comments | « chrome/browser/resources/new_profile.js ('k') | chrome/browser/ui/webui/new_profile_handler.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_factory.h" 5 #include "chrome/browser/ui/webui/chrome_web_ui_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/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_web_ui.h" 10 #include "chrome/browser/extensions/extension_web_ui.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h" 48 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h"
49 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h" 49 #include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h"
50 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" 50 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h"
51 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 51 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
52 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" 52 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h"
53 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" 53 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h"
54 #include "chrome/browser/ui/webui/chromeos/register_page_ui.h" 54 #include "chrome/browser/ui/webui/chromeos/register_page_ui.h"
55 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h" 55 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h"
56 #include "chrome/browser/ui/webui/chromeos/system_info_ui.h" 56 #include "chrome/browser/ui/webui/chromeos/system_info_ui.h"
57 #include "chrome/browser/ui/webui/active_downloads_ui.h" 57 #include "chrome/browser/ui/webui/active_downloads_ui.h"
58 #else
59 #include "chrome/browser/ui/webui/new_profile_ui.h"
58 #endif 60 #endif
59 61
60 #if defined(TOUCH_UI) 62 #if defined(TOUCH_UI)
61 #include "chrome/browser/ui/webui/keyboard_ui.h" 63 #include "chrome/browser/ui/webui/keyboard_ui.h"
62 #endif 64 #endif
63 65
64 #if defined(OS_WIN) 66 #if defined(OS_WIN)
65 #include "chrome/browser/ui/webui/conflicts_ui.h" 67 #include "chrome/browser/ui/webui/conflicts_ui.h"
66 #endif 68 #endif
67 69
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 #else 217 #else
216 if (url.host() == chrome::kChromeUIPrintHost && 218 if (url.host() == chrome::kChromeUIPrintHost &&
217 switches::IsPrintPreviewEnabled()) { 219 switches::IsPrintPreviewEnabled()) {
218 return &NewWebUI<PrintPreviewUI>; 220 return &NewWebUI<PrintPreviewUI>;
219 } 221 }
220 #endif // defined(OS_CHROMEOS) 222 #endif // defined(OS_CHROMEOS)
221 223
222 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) 224 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL)
223 return &NewWebUI<ConstrainedHtmlUI>; 225 return &NewWebUI<ConstrainedHtmlUI>;
224 226
227 #if !defined(OS_CHROMEOS)
228 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) {
229 if (url.host() == chrome::kChromeUINewProfileHost)
230 return &NewWebUI<NewProfileUI>;
231 }
232 #endif
233
225 return NULL; 234 return NULL;
226 } 235 }
227 236
228 // When the test-type switch is set, return a TestType object, which should be a 237 // When the test-type switch is set, return a TestType object, which should be a
229 // subclass of Type. The logic is provided here in the traits class, rather than 238 // subclass of Type. The logic is provided here in the traits class, rather than
230 // in GetInstance() so that the choice is made only once, when the Singleton is 239 // in GetInstance() so that the choice is made only once, when the Singleton is
231 // first instantiated, rather than every time GetInstance() is called. 240 // first instantiated, rather than every time GetInstance() is called.
232 template<typename Type, typename TestType> 241 template<typename Type, typename TestType>
233 struct PossibleTestSingletonTraits : public DefaultSingletonTraits<Type> { 242 struct PossibleTestSingletonTraits : public DefaultSingletonTraits<Type> {
234 static Type* New() { 243 static Type* New() {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 return FlashUI::GetFaviconResourceBytes(); 374 return FlashUI::GetFaviconResourceBytes();
366 375
367 if (page_url.host() == chrome::kChromeUISettingsHost) 376 if (page_url.host() == chrome::kChromeUISettingsHost)
368 return OptionsUI::GetFaviconResourceBytes(); 377 return OptionsUI::GetFaviconResourceBytes();
369 378
370 if (page_url.host() == chrome::kChromeUIPluginsHost) 379 if (page_url.host() == chrome::kChromeUIPluginsHost)
371 return PluginsUI::GetFaviconResourceBytes(); 380 return PluginsUI::GetFaviconResourceBytes();
372 381
373 return NULL; 382 return NULL;
374 } 383 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_profile.js ('k') | chrome/browser/ui/webui/new_profile_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698