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

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: Fixed. 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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 if (state_ == State::ACTIVE) 742 if (state_ == State::ACTIVE)
743 return; 743 return;
744 if (profile_->GetPrefs()->GetBoolean(prefs::kArcSignedIn) || 744 if (profile_->GetPrefs()->GetBoolean(prefs::kArcSignedIn) ||
745 IsOptInVerificationDisabled()) { 745 IsOptInVerificationDisabled()) {
746 StartArc(); 746 StartArc();
747 } else { 747 } else {
748 ShowUI(UIPage::LSO_PROGRESS, base::string16()); 748 ShowUI(UIPage::LSO_PROGRESS, base::string16());
749 } 749 }
750 } 750 }
751 751
752 void ArcAuthService::RestartArc() {
753 OnOptInPreferenceChanged();
754 }
755
752 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state) { 756 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state) {
753 switch (state) { 757 switch (state) {
754 case ArcAuthService::State::NOT_INITIALIZED: 758 case ArcAuthService::State::NOT_INITIALIZED:
755 return os << kStateNotInitialized; 759 return os << kStateNotInitialized;
756 case ArcAuthService::State::STOPPED: 760 case ArcAuthService::State::STOPPED:
757 return os << kStateStopped; 761 return os << kStateStopped;
758 case ArcAuthService::State::FETCHING_CODE: 762 case ArcAuthService::State::FETCHING_CODE:
759 return os << kStateFetchingCode; 763 return os << kStateFetchingCode;
760 case ArcAuthService::State::ACTIVE: 764 case ArcAuthService::State::ACTIVE:
761 return os << kStateActive; 765 return os << kStateActive;
762 default: 766 default:
763 NOTREACHED(); 767 NOTREACHED();
764 return os; 768 return os;
765 } 769 }
766 } 770 }
767 771
768 } // namespace arc 772 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698