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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enrollment_screen.cc

Issue 592753005: Make EnrollmentScreen::SetParameters() idempotent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/enrollment/enrollment_screen.h" 5 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.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/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 EnrollmentScreenActor::EnrollmentMode enrollment_mode, 66 EnrollmentScreenActor::EnrollmentMode enrollment_mode,
67 const std::string& management_domain, 67 const std::string& management_domain,
68 const std::string& user, 68 const std::string& user,
69 const std::string& auth_token, 69 const std::string& auth_token,
70 pairing_chromeos::ControllerPairingController* shark_controller, 70 pairing_chromeos::ControllerPairingController* shark_controller,
71 pairing_chromeos::HostPairingController* remora_controller) { 71 pairing_chromeos::HostPairingController* remora_controller) {
72 enrollment_mode_ = enrollment_mode; 72 enrollment_mode_ = enrollment_mode;
73 user_ = user.empty() ? user : gaia::CanonicalizeEmail(user); 73 user_ = user.empty() ? user : gaia::CanonicalizeEmail(user);
74 auth_token_ = auth_token; 74 auth_token_ = auth_token;
75 shark_controller_ = shark_controller; 75 shark_controller_ = shark_controller;
76 DCHECK(!remora_controller_); 76 if (remora_controller_)
77 remora_controller_->RemoveObserver(this);
77 remora_controller_ = remora_controller; 78 remora_controller_ = remora_controller;
78 if (remora_controller_) 79 if (remora_controller_)
79 remora_controller_->AddObserver(this); 80 remora_controller_->AddObserver(this);
80 actor_->SetParameters(this, enrollment_mode_, management_domain); 81 actor_->SetParameters(this, enrollment_mode_, management_domain);
81 } 82 }
82 83
83 void EnrollmentScreen::PrepareToShow() { 84 void EnrollmentScreen::PrepareToShow() {
84 actor_->PrepareToShow(); 85 actor_->PrepareToShow();
85 } 86 }
86 87
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 sample = policy::kMetricEnrollmentAutoFailed; 393 sample = policy::kMetricEnrollmentAutoFailed;
393 UMA(sample); 394 UMA(sample);
394 } 395 }
395 396
396 void EnrollmentScreen::ShowSigninScreen() { 397 void EnrollmentScreen::ShowSigninScreen() {
397 actor_->Show(); 398 actor_->Show();
398 actor_->ShowSigninScreen(); 399 actor_->ShowSigninScreen();
399 } 400 }
400 401
401 } // namespace chromeos 402 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698