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

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

Issue 2137713002: arc: Provide progress to load TOS content for OptIn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 profile_->GetPrefs()->SetBoolean(prefs::kArcEnabled, false); 660 profile_->GetPrefs()->SetBoolean(prefs::kArcEnabled, false);
661 } 661 }
662 662
663 void ArcAuthService::StartUI() { 663 void ArcAuthService::StartUI() {
664 DCHECK(thread_checker.Get().CalledOnValidThread()); 664 DCHECK(thread_checker.Get().CalledOnValidThread());
665 665
666 SetState(State::FETCHING_CODE); 666 SetState(State::FETCHING_CODE);
667 667
668 if (initial_opt_in_) { 668 if (initial_opt_in_) {
669 initial_opt_in_ = false; 669 initial_opt_in_ = false;
670 ShowUI(UIPage::START, base::string16()); 670 ShowUI(UIPage::TERMS_PROGRESS, base::string16());
671 } else { 671 } else {
672 context_->PrepareContext(); 672 context_->PrepareContext();
673 } 673 }
674 } 674 }
675 675
676 void ArcAuthService::OnPrepareContextFailed() { 676 void ArcAuthService::OnPrepareContextFailed() {
677 DCHECK_EQ(state_, State::FETCHING_CODE); 677 DCHECK_EQ(state_, State::FETCHING_CODE);
678 678
679 ShutdownBridgeAndShowUI( 679 ShutdownBridgeAndShowUI(
680 UIPage::ERROR, 680 UIPage::ERROR,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 return os << kStateFetchingCode; 751 return os << kStateFetchingCode;
752 case ArcAuthService::State::ACTIVE: 752 case ArcAuthService::State::ACTIVE:
753 return os << kStateActive; 753 return os << kStateActive;
754 default: 754 default:
755 NOTREACHED(); 755 NOTREACHED();
756 return os; 756 return os;
757 } 757 }
758 } 758 }
759 759
760 } // namespace arc 760 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698