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

Side by Side Diff: chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.cc

Issue 2682833003: Skip ARC initial screen when everything is set up by policy (Closed)
Patch Set: Sync during managed->unmanaged transition Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/optin/arc_terms_of_service_default_negotia tor.h" 5 #include "chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotia tor.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/chromeos/arc/optin/arc_optin_preference_handler.h" 10 #include "chrome/browser/chromeos/arc/optin/arc_optin_preference_handler.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 void ArcTermsOfServiceDefaultNegotiator::OnMetricsModeChanged(bool enabled, 76 void ArcTermsOfServiceDefaultNegotiator::OnMetricsModeChanged(bool enabled,
77 bool managed) { 77 bool managed) {
78 support_host_->SetMetricsPreferenceCheckbox(enabled, managed); 78 support_host_->SetMetricsPreferenceCheckbox(enabled, managed);
79 } 79 }
80 80
81 void ArcTermsOfServiceDefaultNegotiator::OnBackupAndRestoreModeChanged( 81 void ArcTermsOfServiceDefaultNegotiator::OnBackupAndRestoreModeChanged(
82 bool enabled, 82 bool enabled,
83 bool managed) { 83 bool managed) {
84 support_host_->SetBackupAndRestorePreferenceCheckbox(enabled, managed); 84 const bool checkbox_checked = enabled || !managed;
hidehiko 2017/02/14 11:51:36 For unmanaged users, even if backup-and-restore is
emaxx 2017/02/15 03:40:59 That's exactly what I was trying to achieve: the p
85 support_host_->SetBackupAndRestorePreferenceCheckbox(checkbox_checked,
86 managed);
85 } 87 }
86 88
87 void ArcTermsOfServiceDefaultNegotiator::OnLocationServicesModeChanged( 89 void ArcTermsOfServiceDefaultNegotiator::OnLocationServicesModeChanged(
88 bool enabled, 90 bool enabled,
89 bool managed) { 91 bool managed) {
90 support_host_->SetLocationServicesPreferenceCheckbox(enabled, managed); 92 const bool checkbox_checked = enabled || !managed;
93 support_host_->SetLocationServicesPreferenceCheckbox(checkbox_checked,
94 managed);
91 } 95 }
92 96
93 } // namespace arc 97 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698