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

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

Issue 1754803003: Implement Stub for policy bridge to ARC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ordering and ordinal numbers in .mojom files, nits adressed Created 4 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
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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 void ArcAuthService::OnSignInFailed(arc::ArcSignInFailureReason reason) { 132 void ArcAuthService::OnSignInFailed(arc::ArcSignInFailureReason reason) {
133 DCHECK(thread_checker_.CalledOnValidThread()); 133 DCHECK(thread_checker_.CalledOnValidThread());
134 DCHECK_EQ(state_, State::ACTIVE); 134 DCHECK_EQ(state_, State::ACTIVE);
135 135
136 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false); 136 profile_->GetPrefs()->SetBoolean(prefs::kArcSignedIn, false);
137 ShutdownBridgeAndCloseUI(); 137 ShutdownBridgeAndCloseUI();
138 } 138 }
139 139
140 void ArcAuthService::GetIsAccountManaged(
141 const GetIsAccountManagedCallback& callback) {
142 DCHECK(thread_checker_.CalledOnValidThread());
143 // Stub for testing. TODO(phweiss): Implement correct behaviour.
144 callback.Run(true);
145 }
146
140 void ArcAuthService::SetState(State state) { 147 void ArcAuthService::SetState(State state) {
141 if (state_ == state) 148 if (state_ == state)
142 return; 149 return;
143 state_ = state; 150 state_ = state;
144 FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInChanged(state_)); 151 FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInChanged(state_));
145 } 152 }
146 153
147 void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) { 154 void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) {
148 DCHECK(profile && profile != profile_); 155 DCHECK(profile && profile != profile_);
149 DCHECK(thread_checker_.CalledOnValidThread()); 156 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 return os << kStateFetchingCode; 391 return os << kStateFetchingCode;
385 case ArcAuthService::State::ACTIVE: 392 case ArcAuthService::State::ACTIVE:
386 return os << kStateActive; 393 return os << kStateActive;
387 default: 394 default:
388 NOTREACHED(); 395 NOTREACHED();
389 return os; 396 return os;
390 } 397 }
391 } 398 }
392 399
393 } // namespace arc 400 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/arc_policy_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698