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

Side by Side Diff: chrome/browser/chromeos/arc/policy/arc_android_management_checker.h

Issue 2450683002: Clean up retry-delay-time code. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/policy/arc_android_management_checker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_ANDROID_MANAGEMENT_CHECKER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_ANDROID_MANAGEMENT_CHECKER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_ANDROID_MANAGEMENT_CHECKER_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_ANDROID_MANAGEMENT_CHECKER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h"
12 #include "chrome/browser/chromeos/policy/android_management_client.h" 13 #include "chrome/browser/chromeos/policy/android_management_client.h"
13 #include "google_apis/gaia/oauth2_token_service.h" 14 #include "google_apis/gaia/oauth2_token_service.h"
14 15
15 class ProfileOAuth2TokenService; 16 class ProfileOAuth2TokenService;
16 17
17 namespace arc { 18 namespace arc {
18 19
19 class ArcAndroidManagementCheckerDelegate; 20 class ArcAndroidManagementCheckerDelegate;
20 21
21 class ArcAndroidManagementChecker : public OAuth2TokenService::Observer { 22 class ArcAndroidManagementChecker : public OAuth2TokenService::Observer {
(...skipping 22 matching lines...) Expand all
44 // Unowned pointers. 45 // Unowned pointers.
45 ArcAndroidManagementCheckerDelegate* const delegate_; 46 ArcAndroidManagementCheckerDelegate* const delegate_;
46 ProfileOAuth2TokenService* const token_service_; 47 ProfileOAuth2TokenService* const token_service_;
47 48
48 const std::string account_id_; 49 const std::string account_id_;
49 50
50 // In background mode errors are ignored and retry is attempted. There is no 51 // In background mode errors are ignored and retry is attempted. There is no
51 // retry in foreground mode and result is passed to delegate directly. 52 // retry in foreground mode and result is passed to delegate directly.
52 bool background_mode_; 53 bool background_mode_;
53 54
54 // Keeps current retry time for background mode. 55 // Keeps current retry delay.
55 int retry_time_ms_; 56 base::TimeDelta retry_delay_;
56 57
57 policy::AndroidManagementClient android_management_client_; 58 policy::AndroidManagementClient android_management_client_;
58 59
59 base::WeakPtrFactory<ArcAndroidManagementChecker> weak_ptr_factory_; 60 base::WeakPtrFactory<ArcAndroidManagementChecker> weak_ptr_factory_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(ArcAndroidManagementChecker); 62 DISALLOW_COPY_AND_ASSIGN(ArcAndroidManagementChecker);
62 }; 63 };
63 64
64 } // namespace arc 65 } // namespace arc
65 66
66 #endif // CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_ANDROID_MANAGEMENT_CHECKER_H_ 67 #endif // CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_ANDROID_MANAGEMENT_CHECKER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/policy/arc_android_management_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698