OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_enterprise_reporting_service.h" | 5 #include "chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 11 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
12 #include "components/arc/arc_service_manager.h" | 12 #include "components/arc/arc_service_manager.h" |
13 #include "components/arc/user_data/arc_user_data_service.h" | 13 #include "components/arc/user_data/arc_user_data_service.h" |
14 #include "mojo/public/cpp/bindings/string.h" | |
14 | 15 |
15 namespace arc { | 16 namespace arc { |
16 | 17 |
17 ArcEnterpriseReportingService::ArcEnterpriseReportingService( | 18 ArcEnterpriseReportingService::ArcEnterpriseReportingService( |
18 ArcBridgeService* bridge_service) | 19 ArcBridgeService* bridge_service) |
19 : ArcService(bridge_service), binding_(this), weak_ptr_factory_(this) { | 20 : ArcService(bridge_service), binding_(this), weak_ptr_factory_(this) { |
20 arc_bridge_service()->enterprise_reporting()->AddObserver(this); | 21 arc_bridge_service()->enterprise_reporting()->AddObserver(this); |
21 } | 22 } |
22 | 23 |
23 ArcEnterpriseReportingService::~ArcEnterpriseReportingService() { | 24 ArcEnterpriseReportingService::~ArcEnterpriseReportingService() { |
(...skipping 12 matching lines...) Expand all Loading... | |
36 DCHECK(thread_checker_.CalledOnValidThread()); | 37 DCHECK(thread_checker_.CalledOnValidThread()); |
37 VLOG(1) << "ReportManagementState state=" << state; | 38 VLOG(1) << "ReportManagementState state=" << state; |
38 | 39 |
39 if (state == mojom::ManagementState::MANAGED_DO_LOST) { | 40 if (state == mojom::ManagementState::MANAGED_DO_LOST) { |
40 DCHECK(arc::ArcServiceManager::Get()); | 41 DCHECK(arc::ArcServiceManager::Get()); |
41 ArcAuthService::Get()->RemoveArcData(); | 42 ArcAuthService::Get()->RemoveArcData(); |
42 ArcAuthService::Get()->StopAndEnableArc(); | 43 ArcAuthService::Get()->StopAndEnableArc(); |
43 } | 44 } |
44 } | 45 } |
45 | 46 |
47 void ArcEnterpriseReportingService::OnStatusRetrieved( | |
48 const mojo::String& status, | |
49 const mojo::String& droidGuardInfo) { | |
dcheng
2016/09/06 21:12:46
Nit: C++ naming convention is droid_guard_info
| |
50 // TODO(phweiss) | |
51 } | |
52 | |
46 } // namespace arc | 53 } // namespace arc |
OLD | NEW |