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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_policy_provider.h

Issue 2714493002: Load DeviceLocalAccount policy and DeviceSettings immediately on restore after Chrome crash. (Closed)
Patch Set: wrap Validator in unique_ptr Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 public: 32 public:
33 DeviceLocalAccountPolicyProvider( 33 DeviceLocalAccountPolicyProvider(
34 const std::string& user_id, 34 const std::string& user_id,
35 DeviceLocalAccountPolicyService* service, 35 DeviceLocalAccountPolicyService* service,
36 std::unique_ptr<PolicyMap> chrome_policy_overrides); 36 std::unique_ptr<PolicyMap> chrome_policy_overrides);
37 ~DeviceLocalAccountPolicyProvider() override; 37 ~DeviceLocalAccountPolicyProvider() override;
38 38
39 // Factory function to create and initialize a provider for |user_id|. Returns 39 // Factory function to create and initialize a provider for |user_id|. Returns
40 // NULL if |user_id| is not a device-local account or user policy isn't 40 // NULL if |user_id| is not a device-local account or user policy isn't
41 // applicable for user_id's user type. 41 // applicable for user_id's user type.
42 // If |force_immediate_load| is true then policy is loaded synchronously on
43 // creation.
42 static std::unique_ptr<DeviceLocalAccountPolicyProvider> Create( 44 static std::unique_ptr<DeviceLocalAccountPolicyProvider> Create(
43 const std::string& user_id, 45 const std::string& user_id,
44 DeviceLocalAccountPolicyService* service); 46 DeviceLocalAccountPolicyService* service,
47 bool force_immediate_load);
45 48
46 // ConfigurationPolicyProvider: 49 // ConfigurationPolicyProvider:
47 bool IsInitializationComplete(PolicyDomain domain) const override; 50 bool IsInitializationComplete(PolicyDomain domain) const override;
48 void RefreshPolicies() override; 51 void RefreshPolicies() override;
49 52
50 // DeviceLocalAccountPolicyService::Observer: 53 // DeviceLocalAccountPolicyService::Observer:
51 void OnPolicyUpdated(const std::string& user_id) override; 54 void OnPolicyUpdated(const std::string& user_id) override;
52 void OnDeviceLocalAccountsChanged() override; 55 void OnDeviceLocalAccountsChanged() override;
53 56
54 private: 57 private:
(...skipping 22 matching lines...) Expand all
77 bool waiting_for_policy_refresh_; 80 bool waiting_for_policy_refresh_;
78 81
79 base::WeakPtrFactory<DeviceLocalAccountPolicyProvider> weak_factory_; 82 base::WeakPtrFactory<DeviceLocalAccountPolicyProvider> weak_factory_;
80 83
81 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProvider); 84 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyProvider);
82 }; 85 };
83 86
84 } // namespace policy 87 } // namespace policy
85 88
86 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H _ 89 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_PROVIDER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698