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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Made ChromeURLDataManager's destructor virtual Created 8 years, 8 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
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/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 signin_screen_handler_ = new SigninScreenHandler; 153 signin_screen_handler_ = new SigninScreenHandler;
154 AddScreenHandler(signin_screen_handler_); 154 AddScreenHandler(signin_screen_handler_);
155 155
156 DictionaryValue* localized_strings = new DictionaryValue(); 156 DictionaryValue* localized_strings = new DictionaryValue();
157 GetLocalizedStrings(localized_strings); 157 GetLocalizedStrings(localized_strings);
158 158
159 Profile* profile = Profile::FromWebUI(web_ui); 159 Profile* profile = Profile::FromWebUI(web_ui);
160 // Set up the chrome://theme/ source, for Chrome logo. 160 // Set up the chrome://theme/ source, for Chrome logo.
161 ThemeSource* theme = new ThemeSource(profile); 161 ThemeSource* theme = new ThemeSource(profile);
162 profile->GetChromeURLDataManager()->AddDataSource(theme); 162 ChromeURLDataManager::AddDataSource(profile, theme);
163 163
164 // Set up the chrome://terms/ data source, for EULA content. 164 // Set up the chrome://terms/ data source, for EULA content.
165 AboutUIHTMLSource* about_source = 165 AboutUIHTMLSource* about_source =
166 new AboutUIHTMLSource(chrome::kChromeUITermsHost, profile); 166 new AboutUIHTMLSource(chrome::kChromeUITermsHost, profile);
167 profile->GetChromeURLDataManager()->AddDataSource(about_source); 167 ChromeURLDataManager::AddDataSource(profile, about_source);
168 168
169 // Set up the chrome://oobe/ source. 169 // Set up the chrome://oobe/ source.
170 OobeUIHTMLSource* html_source = new OobeUIHTMLSource(localized_strings); 170 OobeUIHTMLSource* html_source = new OobeUIHTMLSource(localized_strings);
171 profile->GetChromeURLDataManager()->AddDataSource(html_source); 171 ChromeURLDataManager::AddDataSource(profile, html_source);
172 172
173 // Set up the chrome://userimage/ source. 173 // Set up the chrome://userimage/ source.
174 options2::UserImageSource* user_image_source = 174 options2::UserImageSource* user_image_source =
175 new options2::UserImageSource(); 175 new options2::UserImageSource();
176 profile->GetChromeURLDataManager()->AddDataSource(user_image_source); 176 ChromeURLDataManager::AddDataSource(profile, user_image_source);
177 } 177 }
178 178
179 OobeUI::~OobeUI() { 179 OobeUI::~OobeUI() {
180 } 180 }
181 181
182 void OobeUI::ShowScreen(WizardScreen* screen) { 182 void OobeUI::ShowScreen(WizardScreen* screen) {
183 screen->Show(); 183 screen->Show();
184 } 184 }
185 185
186 void OobeUI::HideScreen(WizardScreen* screen) { 186 void OobeUI::HideScreen(WizardScreen* screen) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 void OobeUI::ResetSigninScreenHandlerDelegate() { 249 void OobeUI::ResetSigninScreenHandlerDelegate() {
250 signin_screen_handler_->SetDelegate(NULL); 250 signin_screen_handler_->SetDelegate(NULL);
251 } 251 }
252 252
253 void OobeUI::OnLoginPromptVisible() { 253 void OobeUI::OnLoginPromptVisible() {
254 user_image_screen_actor_->CheckCameraPresence(); 254 user_image_screen_actor_->CheckCameraPresence();
255 } 255 }
256 256
257 } // namespace chromeos 257 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc ('k') | chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698