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

Side by Side Diff: chrome/browser/chromeos/login/screens/network_screen.cc

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 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/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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 is_network_subscribed_ = false; 308 is_network_subscribed_ = false;
309 NetworkHandler::Get()->network_state_handler()->RemoveObserver( 309 NetworkHandler::Get()->network_state_handler()->RemoveObserver(
310 this, FROM_HERE); 310 this, FROM_HERE);
311 } 311 }
312 } 312 }
313 313
314 void NetworkScreen::NotifyOnConnection() { 314 void NetworkScreen::NotifyOnConnection() {
315 // TODO(nkostylev): Check network connectivity. 315 // TODO(nkostylev): Check network connectivity.
316 UnsubscribeNetworkNotification(); 316 UnsubscribeNetworkNotification();
317 connection_timer_.Stop(); 317 connection_timer_.Stop();
318 Finish(BaseScreenDelegate::NETWORK_CONNECTED); 318 Finish(ScreenExitCode::NETWORK_CONNECTED);
319 } 319 }
320 320
321 void NetworkScreen::OnConnectionTimeout() { 321 void NetworkScreen::OnConnectionTimeout() {
322 StopWaitingForConnection(network_id_); 322 StopWaitingForConnection(network_id_);
323 if (!network_state_helper_->IsConnected() && view_) { 323 if (!network_state_helper_->IsConnected() && view_) {
324 // Show error bubble. 324 // Show error bubble.
325 view_->ShowError(l10n_util::GetStringFUTF16( 325 view_->ShowError(l10n_util::GetStringFUTF16(
326 IDS_NETWORK_SELECTION_ERROR, 326 IDS_NETWORK_SELECTION_ERROR,
327 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME), network_id_)); 327 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME), network_id_));
328 } 328 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 observer.OnLanguageListReloaded(); 441 observer.OnLanguageListReloaded();
442 } 442 }
443 443
444 void NetworkScreen::OnSystemTimezoneChanged() { 444 void NetworkScreen::OnSystemTimezoneChanged() {
445 std::string current_timezone_id; 445 std::string current_timezone_id;
446 CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id); 446 CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id);
447 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); 447 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id);
448 } 448 }
449 449
450 } // namespace chromeos 450 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698