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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2864433003: [ARC] Add browser test of ArcAuthService (Closed)
Patch Set: Response to reviews Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index 27208090e8094d062a0e6f202740618e636d0470..b90cf0d1b515d45caed009ab95972165b8290ac7 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -29,8 +29,6 @@
namespace arc {
namespace {
-ArcAuthService* g_arc_auth_service = nullptr;
-
// Convers mojom::ArcSignInFailureReason into ProvisiningResult.
ProvisioningResult ConvertArcSignInFailureReasonToProvisioningResult(
mojom::ArcSignInFailureReason reason) {
@@ -71,6 +69,9 @@ mojom::ChromeAccountType GetAccountType() {
} // namespace
+// static
+const char ArcAuthService::kArcServiceName[] = "arc::ArcAuthService";
+
// TODO(lhchavez): Get rid of this class once we can safely remove all the
// deprecated interfaces and only need to care about one type of callback.
class ArcAuthService::AccountInfoNotifier {
@@ -134,22 +135,11 @@ class ArcAuthService::AccountInfoNotifier {
ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service)
: ArcService(bridge_service), binding_(this), weak_ptr_factory_(this) {
- DCHECK(!g_arc_auth_service);
- g_arc_auth_service = this;
arc_bridge_service()->auth()->AddObserver(this);
}
ArcAuthService::~ArcAuthService() {
arc_bridge_service()->auth()->RemoveObserver(this);
-
- DCHECK_EQ(g_arc_auth_service, this);
- g_arc_auth_service = nullptr;
-}
-
-// static
-ArcAuthService* ArcAuthService::GetForTest() {
- DCHECK(g_arc_auth_service);
- return g_arc_auth_service;
}
void ArcAuthService::OnInstanceReady() {
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/auth/arc_auth_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698