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

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

Issue 2801993002: Abandon user sign in when policy is retrieved before session started (Closed)
Patch Set: Nit Created 3 years, 8 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_STORE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void LoadImmediately(); 52 void LoadImmediately();
53 53
54 private: 54 private:
55 // The callback invoked once policy validation is complete. Passed are the 55 // The callback invoked once policy validation is complete. Passed are the
56 // used public key and the validator. 56 // used public key and the validator.
57 using ValidateCompletionCallback = 57 using ValidateCompletionCallback =
58 base::Callback<void(const std::string&, UserCloudPolicyValidator*)>; 58 base::Callback<void(const std::string&, UserCloudPolicyValidator*)>;
59 59
60 // Called back by |session_manager_client_| after policy retrieval. Checks for 60 // Called back by |session_manager_client_| after policy retrieval. Checks for
61 // success and triggers policy validation. 61 // success and triggers policy validation.
62 void ValidateLoadedPolicyBlob(bool validate_in_background, 62 void ValidateLoadedPolicyBlob(
63 const std::string& policy_blob); 63 bool validate_in_background,
64 const std::string& policy_blob,
65 const chromeos::SessionManagerClient::RetrievePolicyResponseType&
emaxx 2017/04/18 15:03:16 nit: Enum values are usually passed by value, not
emaxx 2017/04/18 15:03:17 nit: #include "chromeos/dbus/session_manager_clien
igorcov 2017/04/20 14:52:29 Done.
igorcov 2017/04/20 14:52:29 Done.
66 response_type);
64 67
65 // Updates state after validation and notifies observers. 68 // Updates state after validation and notifies observers.
66 void UpdatePolicy(const std::string& signature_validation_public_key, 69 void UpdatePolicy(const std::string& signature_validation_public_key,
67 UserCloudPolicyValidator* validator); 70 UserCloudPolicyValidator* validator);
68 71
69 // Sends the policy blob to session_manager for storing after validation. 72 // Sends the policy blob to session_manager for storing after validation.
70 void StoreValidatedPolicy( 73 void StoreValidatedPolicy(
71 const std::string& signature_validation_public_key_unused, 74 const std::string& signature_validation_public_key_unused,
72 UserCloudPolicyValidator* validator); 75 UserCloudPolicyValidator* validator);
73 76
(...skipping 23 matching lines...) Expand all
97 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; 100 scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
98 101
99 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_; 102 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_;
100 103
101 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore); 104 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore);
102 }; 105 };
103 106
104 } // namespace policy 107 } // namespace policy
105 108
106 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ 109 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698