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

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

Issue 2165643004: arc: add enterprise_reporting.mojom interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: watchdog --> user_data Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/shelf/shelf_delegate.h" 9 #include "ash/shelf/shelf_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 if (state_ == State::ACTIVE) 745 if (state_ == State::ACTIVE)
746 return; 746 return;
747 if (profile_->GetPrefs()->GetBoolean(prefs::kArcSignedIn) || 747 if (profile_->GetPrefs()->GetBoolean(prefs::kArcSignedIn) ||
748 IsOptInVerificationDisabled()) { 748 IsOptInVerificationDisabled()) {
749 StartArc(); 749 StartArc();
750 } else { 750 } else {
751 ShowUI(UIPage::LSO_PROGRESS, base::string16()); 751 ShowUI(UIPage::LSO_PROGRESS, base::string16());
752 } 752 }
753 } 753 }
754 754
755 void ArcAuthService::StopArcAndWipeData() {
756 clear_required_ = true;
757 StopArc();
758 }
759
760 void ArcAuthService::RestartArc() {
761 OnOptInPreferenceChanged();
762 }
763
755 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state) { 764 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state) {
756 switch (state) { 765 switch (state) {
757 case ArcAuthService::State::NOT_INITIALIZED: 766 case ArcAuthService::State::NOT_INITIALIZED:
758 return os << kStateNotInitialized; 767 return os << kStateNotInitialized;
759 case ArcAuthService::State::STOPPED: 768 case ArcAuthService::State::STOPPED:
760 return os << kStateStopped; 769 return os << kStateStopped;
761 case ArcAuthService::State::FETCHING_CODE: 770 case ArcAuthService::State::FETCHING_CODE:
762 return os << kStateFetchingCode; 771 return os << kStateFetchingCode;
763 case ArcAuthService::State::ACTIVE: 772 case ArcAuthService::State::ACTIVE:
764 return os << kStateActive; 773 return os << kStateActive;
765 default: 774 default:
766 NOTREACHED(); 775 NOTREACHED();
767 return os; 776 return os;
768 } 777 }
769 } 778 }
770 779
771 } // namespace arc 780 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698