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

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

Issue 1492043002: Introduced switches for Master/Slave bootstrapping process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the unused shark requisition. Created 5 years 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/network_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // "EnableLoginLayouts()". This way EnableLoginLayouts() happens after user 201 // "EnableLoginLayouts()". This way EnableLoginLayouts() happens after user
202 // input method has been changed, resetting input method to hardware default. 202 // input method has been changed, resetting input method to hardware default.
203 // 203 //
204 // So we need to disable activation of login layouts if we are already in 204 // So we need to disable activation of login layouts if we are already in
205 // active user session. 205 // active user session.
206 // 206 //
207 // 3) This is the bootstrapping process for the remora device. The locale & 207 // 3) This is the bootstrapping process for the remora device. The locale &
208 // input of the remora device is set up by a shark device. In this case we 208 // input of the remora device is set up by a shark device. In this case we
209 // don't want EnableLoginLayout() to reset the input method to the hardware 209 // don't want EnableLoginLayout() to reset the input method to the hardware
210 // default method. 210 // default method.
211 const bool is_remora = g_browser_process->platform_part() 211 const bool is_remora = base::CommandLine::ForCurrentProcess()->HasSwitch(
212 ->browser_policy_connector_chromeos() 212 chromeos::switches::kOobeBootstrappingRemora);
213 ->GetDeviceCloudPolicyManager()
214 ->IsRemoraRequisition();
215 213
216 const bool enable_layouts = 214 const bool enable_layouts =
217 !user_manager::UserManager::Get()->IsUserLoggedIn() && !is_remora; 215 !user_manager::UserManager::Get()->IsUserLoggedIn() && !is_remora;
218 216
219 dict->Set("languageList", language_list.release()); 217 dict->Set("languageList", language_list.release());
220 dict->Set( 218 dict->Set(
221 "inputMethodsList", 219 "inputMethodsList",
222 GetAndActivateLoginKeyboardLayouts( 220 GetAndActivateLoginKeyboardLayouts(
223 application_locale, selected_input_method, enable_layouts).release()); 221 application_locale, selected_input_method, enable_layouts).release());
224 dict->Set("timezoneList", GetTimezoneList()); 222 dict->Set("timezoneList", GetTimezoneList());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 timezone_option->SetString("value", timezone_id); 257 timezone_option->SetString("value", timezone_id);
260 timezone_option->SetString("title", timezone_name); 258 timezone_option->SetString("title", timezone_name);
261 timezone_option->SetBoolean("selected", timezone_id == current_timezone_id); 259 timezone_option->SetBoolean("selected", timezone_id == current_timezone_id);
262 timezone_list->Append(timezone_option.release()); 260 timezone_list->Append(timezone_option.release());
263 } 261 }
264 262
265 return timezone_list.release(); 263 return timezone_list.release();
266 } 264 }
267 265
268 } // namespace chromeos 266 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698