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_android_management_checker.h" | 5 #include "chrome/browser/chromeos/arc/policy/arc_android_management_checker.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/browser_process_platform_part.h" | 10 #include "chrome/browser/browser_process_platform_part.h" |
11 #include "chrome/browser/chromeos/arc/arc_android_management_checker_delegate.h" | 11 #include "chrome/browser/chromeos/arc/policy/arc_android_management_checker_dele
gate.h" |
12 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 12 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
13 #include "components/policy/core/common/cloud/device_management_service.h" | 13 #include "components/policy/core/common/cloud/device_management_service.h" |
14 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 14 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
15 | 15 |
16 namespace arc { | 16 namespace arc { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 constexpr int kRetryTimeMinMs = 10 * 1000; // 10 sec. | 20 constexpr int kRetryTimeMinMs = 10 * 1000; // 10 sec. |
21 constexpr int kRetryTimeMaxMs = 1 * 60 * 60 * 1000; // 1 hour. | 21 constexpr int kRetryTimeMaxMs = 1 * 60 * 60 * 1000; // 1 hour. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 ScheduleCheck(); | 115 ScheduleCheck(); |
116 return; | 116 return; |
117 } | 117 } |
118 | 118 |
119 base::ThreadTaskRunnerHandle::Get()->PostTask( | 119 base::ThreadTaskRunnerHandle::Get()->PostTask( |
120 FROM_HERE, base::Bind(&ArcAndroidManagementChecker::DispatchResult, | 120 FROM_HERE, base::Bind(&ArcAndroidManagementChecker::DispatchResult, |
121 weak_ptr_factory_.GetWeakPtr(), result)); | 121 weak_ptr_factory_.GetWeakPtr(), result)); |
122 } | 122 } |
123 | 123 |
124 } // namespace arc | 124 } // namespace arc |
OLD | NEW |