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

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

Issue 2195653002: arc: add enterprise_reporting.mojom interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Corrected upstream branch. Created 4 years, 4 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // Using SERVICE_UNAVAILABLE instead of UNKNOWN_ERROR, since the latter 203 // Using SERVICE_UNAVAILABLE instead of UNKNOWN_ERROR, since the latter
204 // causes this code to not try to stop ARC, so it would retry without the 204 // causes this code to not try to stop ARC, so it would retry without the
205 // user noticing. 205 // user noticing.
206 OnSignInFailed(arc::mojom::ArcSignInFailureReason::SERVICE_UNAVAILABLE); 206 OnSignInFailed(arc::mojom::ArcSignInFailureReason::SERVICE_UNAVAILABLE);
207 } 207 }
208 if (!clear_required_) 208 if (!clear_required_)
209 return; 209 return;
210 clear_required_ = false; 210 clear_required_ = false;
211 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData( 211 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData(
212 cryptohome::Identification( 212 cryptohome::Identification(
213 multi_user_util::GetAccountIdFromProfile(profile_))); 213 multi_user_util::GetAccountIdFromProfile(profile_)),
214 chromeos::SessionManagerClient::ArcCallback());
214 } 215 }
215 216
216 std::string ArcAuthService::GetAndResetAuthCode() { 217 std::string ArcAuthService::GetAndResetAuthCode() {
217 DCHECK(thread_checker.Get().CalledOnValidThread()); 218 DCHECK(thread_checker.Get().CalledOnValidThread());
218 std::string auth_code; 219 std::string auth_code;
219 auth_code_.swap(auth_code); 220 auth_code_.swap(auth_code);
220 return auth_code; 221 return auth_code;
221 } 222 }
222 223
223 void ArcAuthService::GetAuthCodeDeprecated( 224 void ArcAuthService::GetAuthCodeDeprecated(
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 return os << kStateFetchingCode; 755 return os << kStateFetchingCode;
755 case ArcAuthService::State::ACTIVE: 756 case ArcAuthService::State::ACTIVE:
756 return os << kStateActive; 757 return os << kStateActive;
757 default: 758 default:
758 NOTREACHED(); 759 NOTREACHED();
759 return os; 760 return os;
760 } 761 }
761 } 762 }
762 763
763 } // namespace arc 764 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698