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

Side by Side Diff: chrome/browser/chromeos/login/base_login_display_host.cc

Issue 10917120: Activate the VariationsService for ChromeOS and ensure that it does not ping the server until the E… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: asvit nit 2 Created 8 years, 3 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/chromeos/login/base_login_display_host.h" 5 #include "chrome/browser/chromeos/login/base_login_display_host.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/chromeos/login/existing_user_controller.h" 22 #include "chrome/browser/chromeos/login/existing_user_controller.h"
23 #include "chrome/browser/chromeos/login/helper.h" 23 #include "chrome/browser/chromeos/login/helper.h"
24 #include "chrome/browser/chromeos/login/language_switch_menu.h" 24 #include "chrome/browser/chromeos/login/language_switch_menu.h"
25 #include "chrome/browser/chromeos/login/login_utils.h" 25 #include "chrome/browser/chromeos/login/login_utils.h"
26 #include "chrome/browser/chromeos/login/login_wizard.h" 26 #include "chrome/browser/chromeos/login/login_wizard.h"
27 #include "chrome/browser/chromeos/login/user_manager.h" 27 #include "chrome/browser/chromeos/login/user_manager.h"
28 #include "chrome/browser/chromeos/login/webui_login_display_host.h" 28 #include "chrome/browser/chromeos/login/webui_login_display_host.h"
29 #include "chrome/browser/chromeos/login/wizard_controller.h" 29 #include "chrome/browser/chromeos/login/wizard_controller.h"
30 #include "chrome/browser/chromeos/mobile_config.h" 30 #include "chrome/browser/chromeos/mobile_config.h"
31 #include "chrome/browser/chromeos/system/timezone_settings.h" 31 #include "chrome/browser/chromeos/system/timezone_settings.h"
32 #include "chrome/browser/metrics/variations/variations_service.h"
32 #include "chrome/browser/policy/auto_enrollment_client.h" 33 #include "chrome/browser/policy/auto_enrollment_client.h"
33 #include "chrome/browser/policy/browser_policy_connector.h" 34 #include "chrome/browser/policy/browser_policy_connector.h"
34 #include "chrome/browser/prefs/pref_service.h" 35 #include "chrome/browser/prefs/pref_service.h"
35 #include "chrome/common/chrome_notification_types.h" 36 #include "chrome/common/chrome_notification_types.h"
36 #include "chrome/common/chrome_switches.h" 37 #include "chrome/common/chrome_switches.h"
37 #include "chrome/common/pref_names.h" 38 #include "chrome/common/pref_names.h"
38 #include "chromeos/dbus/dbus_thread_manager.h" 39 #include "chromeos/dbus/dbus_thread_manager.h"
39 #include "chromeos/dbus/session_manager_client.h" 40 #include "chromeos/dbus/session_manager_client.h"
40 #include "content/public/browser/notification_service.h" 41 #include "content/public/browser/notification_service.h"
41 #include "content/public/browser/notification_types.h" 42 #include "content/public/browser/notification_types.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 const std::string& first_screen_name, 190 const std::string& first_screen_name,
190 DictionaryValue* screen_parameters) { 191 DictionaryValue* screen_parameters) {
191 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; 192 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name;
192 // Create and show the wizard. 193 // Create and show the wizard.
193 // Note, dtor of the old WizardController should be called before ctor of the 194 // Note, dtor of the old WizardController should be called before ctor of the
194 // new one, because "default_controller()" is updated there. So pure "reset()" 195 // new one, because "default_controller()" is updated there. So pure "reset()"
195 // is done before new controller creation. 196 // is done before new controller creation.
196 wizard_controller_.reset(); 197 wizard_controller_.reset();
197 wizard_controller_.reset(CreateWizardController()); 198 wizard_controller_.reset(CreateWizardController());
198 199
200 g_browser_process->variations_service()->
201 RegisterForEulaAcceptedNotification(wizard_controller_.get());
Alexei Svitkine (slow) 2012/09/14 20:50:16 I don't like this at all. I understand you're tryi
SteveT 2012/09/14 20:52:45 Hmm, this seems less hacky in the sense that the d
Ilya Sherman 2012/09/14 20:55:43 Ick. It looks like the WizardController class pro
Alexei Svitkine (slow) 2012/09/14 20:59:21 It looks like that is set to NULL until the wizard
SteveT 2012/09/14 21:01:02 That was my original approach WAAAAYY back. The is
Ilya Sherman 2012/09/14 21:05:17 I didn't see Alexei's suggestion until after I had
SteveT 2012/09/14 21:09:24 That's a possibility, assuming that common object
Nikita (slow) 2012/09/17 07:57:47 Instance of LoginDisplayHost/BaseLoginDisplayHost
SteveT 2012/09/17 14:32:28 From offline discussion with Nikita: It looks lik
202
199 oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered(); 203 oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered();
200 SetOobeProgressBarVisible(oobe_progress_bar_visible_); 204 SetOobeProgressBarVisible(oobe_progress_bar_visible_);
201 wizard_controller_->Init(first_screen_name, screen_parameters); 205 wizard_controller_->Init(first_screen_name, screen_parameters);
202 } 206 }
203 207
204 void BaseLoginDisplayHost::StartSignInScreen() { 208 void BaseLoginDisplayHost::StartSignInScreen() {
205 DVLOG(1) << "Starting sign in screen"; 209 DVLOG(1) << "Starting sign in screen";
206 const chromeos::UserList& users = chromeos::UserManager::Get()->GetUsers(); 210 const chromeos::UserList& users = chromeos::UserManager::Get()->GetUsers();
207 211
208 // Fix for users who updated device and thus never passed register screen. 212 // Fix for users who updated device and thus never passed register screen.
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 VLOG(1) << "Initial time zone: " << timezone_name; 571 VLOG(1) << "Initial time zone: " << timezone_name;
568 // Apply locale customizations only once to preserve whatever locale 572 // Apply locale customizations only once to preserve whatever locale
569 // user has changed to during OOBE. 573 // user has changed to during OOBE.
570 if (!timezone_name.empty()) { 574 if (!timezone_name.empty()) {
571 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( 575 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
572 UTF8ToUTF16(timezone_name)); 576 UTF8ToUTF16(timezone_name));
573 } 577 }
574 } 578 }
575 579
576 } // namespace chromeos 580 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698