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

Side by Side Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2742013002: Don't skip ARC ToS due to policies if ArcEnabled is not managed (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_session_manager_unittest.cc » ('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 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/arc_session_manager.h" 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/shelf/shelf_delegate.h" 9 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 profile_->GetPrefs()->SetBoolean(prefs::kArcTermsAccepted, true); 656 profile_->GetPrefs()->SetBoolean(prefs::kArcTermsAccepted, true);
657 StartAndroidManagementCheck(); 657 StartAndroidManagementCheck();
658 } 658 }
659 659
660 bool ArcSessionManager::IsArcTermsOfServiceNegotiationNeeded() const { 660 bool ArcSessionManager::IsArcTermsOfServiceNegotiationNeeded() const {
661 DCHECK(profile_); 661 DCHECK(profile_);
662 662
663 // Skip to show UI asking users to set up ARC OptIn preferences, if all of 663 // Skip to show UI asking users to set up ARC OptIn preferences, if all of
664 // them are managed by the admin policy. Note that the ToS agreement is anyway 664 // them are managed by the admin policy. Note that the ToS agreement is anyway
665 // not shown in the case of the managed ARC. 665 // not shown in the case of the managed ARC.
666 if (AreArcAllOptInPreferencesManagedForProfile(profile_)) { 666 if (IsArcPlayStoreEnabledPreferenceManagedForProfile(profile_) &&
667 AreArcAllOptInPreferencesManagedForProfile(profile_)) {
667 VLOG(1) << "All opt-in preferences are under managed. " 668 VLOG(1) << "All opt-in preferences are under managed. "
668 << "Skip ARC Terms of Service negotiation."; 669 << "Skip ARC Terms of Service negotiation.";
669 return false; 670 return false;
670 } 671 }
671 672
672 // If it is marked that the Terms of service is accepted already, 673 // If it is marked that the Terms of service is accepted already,
673 // just skip the negotiation with user, and start Android management 674 // just skip the negotiation with user, and start Android management
674 // check directly. 675 // check directly.
675 // This happens, e.g., when a user accepted the Terms of service on Opt-in 676 // This happens, e.g., when a user accepted the Terms of service on Opt-in
676 // flow, but logged out before ARC sign in procedure was done. Then, logs 677 // flow, but logged out before ARC sign in procedure was done. Then, logs
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 974
974 #undef MAP_STATE 975 #undef MAP_STATE
975 976
976 // Some compilers report an error even if all values of an enum-class are 977 // Some compilers report an error even if all values of an enum-class are
977 // covered exhaustively in a switch statement. 978 // covered exhaustively in a switch statement.
978 NOTREACHED() << "Invalid value " << static_cast<int>(state); 979 NOTREACHED() << "Invalid value " << static_cast<int>(state);
979 return os; 980 return os;
980 } 981 }
981 982
982 } // namespace arc 983 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_session_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698