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

Side by Side Diff: chrome/browser/policy/device_management_policy_provider.h

Issue 6074003: Handle policy refresh internally in ConfigurationPolicyPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 public DeviceTokenFetcher::Observer { 34 public DeviceTokenFetcher::Observer {
35 public: 35 public:
36 DeviceManagementPolicyProvider(const PolicyDefinitionList* policy_list, 36 DeviceManagementPolicyProvider(const PolicyDefinitionList* policy_list,
37 DeviceManagementBackend* backend, 37 DeviceManagementBackend* backend,
38 Profile* profile); 38 Profile* profile);
39 39
40 virtual ~DeviceManagementPolicyProvider(); 40 virtual ~DeviceManagementPolicyProvider();
41 41
42 // ConfigurationPolicyProvider implementation: 42 // ConfigurationPolicyProvider implementation:
43 virtual bool Provide(ConfigurationPolicyStoreInterface* store); 43 virtual bool Provide(ConfigurationPolicyStoreInterface* store);
44 virtual bool IsInitializationComplete() const;
44 45
45 // DevicePolicyResponseDelegate implementation: 46 // DevicePolicyResponseDelegate implementation:
46 virtual void HandlePolicyResponse( 47 virtual void HandlePolicyResponse(
47 const em::DevicePolicyResponse& response); 48 const em::DevicePolicyResponse& response);
48 virtual void OnError(DeviceManagementBackend::ErrorCode code); 49 virtual void OnError(DeviceManagementBackend::ErrorCode code);
49 50
50 // DeviceTokenFetcher::Observer implementation: 51 // DeviceTokenFetcher::Observer implementation:
51 virtual void OnTokenSuccess(); 52 virtual void OnTokenSuccess();
52 virtual void OnTokenError(); 53 virtual void OnTokenError();
53 virtual void OnNotManaged(); 54 virtual void OnNotManaged();
54 55
55 // True if a policy request has been sent to the device management backend
56 // server and no response or error has yet been received.
57 bool IsPolicyRequestPending() const { return policy_request_pending_; }
58
59 bool waiting_for_initial_policies() const {
60 return waiting_for_initial_policies_;
61 }
62
63 // Tells the provider that the passed in token service reference is about to 56 // Tells the provider that the passed in token service reference is about to
64 // become invalid. 57 // become invalid.
65 void Shutdown(); 58 void Shutdown();
66 59
67 private: 60 private:
68 class InitializeAfterIOThreadExistsTask; 61 class InitializeAfterIOThreadExistsTask;
69 class RefreshTask; 62 class RefreshTask;
70 63
71 friend class DeviceManagementPolicyProviderTest; 64 friend class DeviceManagementPolicyProviderTest;
72 65
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int64 policy_refresh_error_delay_ms_; 137 int64 policy_refresh_error_delay_ms_;
145 int64 token_fetch_error_delay_ms_; 138 int64 token_fetch_error_delay_ms_;
146 int64 unmanaged_device_refresh_rate_ms_; 139 int64 unmanaged_device_refresh_rate_ms_;
147 140
148 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); 141 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider);
149 }; 142 };
150 143
151 } // namespace policy 144 } // namespace policy
152 145
153 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ 146 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698