| OLD | NEW |
| 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/screens/network_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/network_screen.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 std::string NetworkScreen::GetInputMethod() const { | 131 std::string NetworkScreen::GetInputMethod() const { |
| 132 return input_method_; | 132 return input_method_; |
| 133 } | 133 } |
| 134 | 134 |
| 135 void NetworkScreen::SetTimezone(const std::string& timezone_id) { | 135 void NetworkScreen::SetTimezone(const std::string& timezone_id) { |
| 136 std::string current_timezone_id; | 136 std::string current_timezone_id; |
| 137 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); | 137 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); |
| 138 if (current_timezone_id == timezone_id || timezone_id.empty()) | 138 if (current_timezone_id == timezone_id || timezone_id.empty()) |
| 139 return; | 139 return; |
| 140 timezone_ = timezone_id; | 140 timezone_ = timezone_id; |
| 141 g_browser_process->local_state()->SetString(prefs::kSigninScreenTimezone, |
| 142 timezone_id); |
| 141 CrosSettings::Get()->SetString(kSystemTimezone, timezone_id); | 143 CrosSettings::Get()->SetString(kSystemTimezone, timezone_id); |
| 142 } | 144 } |
| 143 | 145 |
| 144 std::string NetworkScreen::GetTimezone() const { | 146 std::string NetworkScreen::GetTimezone() const { |
| 145 return timezone_; | 147 return timezone_; |
| 146 } | 148 } |
| 147 | 149 |
| 148 void NetworkScreen::GetConnectedWifiNetwork(std::string* out_onc_spec) { | 150 void NetworkScreen::GetConnectedWifiNetwork(std::string* out_onc_spec) { |
| 149 // Currently We can only transfer unsecured WiFi configuration from shark to | 151 // Currently We can only transfer unsecured WiFi configuration from shark to |
| 150 // remora. There is no way to get password for a secured Wifi network in Cros | 152 // remora. There is no way to get password for a secured Wifi network in Cros |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 observer.OnLanguageListReloaded(); | 445 observer.OnLanguageListReloaded(); |
| 444 } | 446 } |
| 445 | 447 |
| 446 void NetworkScreen::OnSystemTimezoneChanged() { | 448 void NetworkScreen::OnSystemTimezoneChanged() { |
| 447 std::string current_timezone_id; | 449 std::string current_timezone_id; |
| 448 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); | 450 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); |
| 449 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); | 451 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); |
| 450 } | 452 } |
| 451 | 453 |
| 452 } // namespace chromeos | 454 } // namespace chromeos |
| OLD | NEW |