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

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

Issue 220933003: Only perform forced re-enrollment in official builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, fix empty argument case. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/auto_enrollment_check_step.h" 5 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_step.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/logging.h" 10 #include "base/logging.h"
(...skipping 11 matching lines...) Expand all
22 auto_enrollment_controller_(auto_enrollment_controller), 22 auto_enrollment_controller_(auto_enrollment_controller),
23 captive_portal_status_( 23 captive_portal_status_(
24 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN), 24 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN),
25 auto_enrollment_state_(policy::AUTO_ENROLLMENT_STATE_IDLE) {} 25 auto_enrollment_state_(policy::AUTO_ENROLLMENT_STATE_IDLE) {}
26 26
27 AutoEnrollmentCheckStep::~AutoEnrollmentCheckStep() { 27 AutoEnrollmentCheckStep::~AutoEnrollmentCheckStep() {
28 NetworkPortalDetector::Get()->RemoveObserver(this); 28 NetworkPortalDetector::Get()->RemoveObserver(this);
29 } 29 }
30 30
31 void AutoEnrollmentCheckStep::Start() { 31 void AutoEnrollmentCheckStep::Start() {
32 if (!CommandLine::ForCurrentProcess()->HasSwitch( 32 if (AutoEnrollmentController::GetMode() !=
33 chromeos::switches::kEnterpriseEnableForcedReEnrollment)) { 33 AutoEnrollmentController::MODE_FORCED_RE_ENROLLMENT) {
34 SignalCompletion(); 34 SignalCompletion();
35 return; 35 return;
36 } 36 }
37 37
38 // Make sure the auto-enrollment client is running. 38 // Make sure the auto-enrollment client is running.
39 auto_enrollment_controller_->Start(); 39 auto_enrollment_controller_->Start();
40 40
41 auto_enrollment_progress_subscription_ = 41 auto_enrollment_progress_subscription_ =
42 auto_enrollment_controller_->RegisterProgressCallback( 42 auto_enrollment_controller_->RegisterProgressCallback(
43 base::Bind(&AutoEnrollmentCheckStep::OnAutoEnrollmentCheckProgressed, 43 base::Bind(&AutoEnrollmentCheckStep::OnAutoEnrollmentCheckProgressed,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 void AutoEnrollmentCheckStep::SignalCompletion() { 169 void AutoEnrollmentCheckStep::SignalCompletion() {
170 NetworkPortalDetector::Get()->RemoveObserver(this); 170 NetworkPortalDetector::Get()->RemoveObserver(this);
171 auto_enrollment_progress_subscription_.reset(); 171 auto_enrollment_progress_subscription_.reset();
172 screen_observer_->OnExit( 172 screen_observer_->OnExit(
173 ScreenObserver::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED); 173 ScreenObserver::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED);
174 } 174 }
175 175
176 } // namespace chromeos 176 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698