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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_test_helper.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_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 base::EmptyString() : entry->second.policy_blob_; 75 base::EmptyString() : entry->second.policy_blob_;
76 } 76 }
77 77
78 void set_device_local_account_policy_blob(const std::string& id, 78 void set_device_local_account_policy_blob(const std::string& id,
79 const std::string& policy_blob) { 79 const std::string& policy_blob) {
80 device_local_account_policy_[id].policy_blob_ = policy_blob; 80 device_local_account_policy_[id].policy_blob_ = policy_blob;
81 } 81 }
82 82
83 // SessionManagerClient: 83 // SessionManagerClient:
84 void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override; 84 void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override;
85 std::string BlockingRetrieveDevicePolicy() override;
85 void RetrieveDeviceLocalAccountPolicy( 86 void RetrieveDeviceLocalAccountPolicy(
86 const std::string& account_id, 87 const std::string& account_id,
87 const RetrievePolicyCallback& callback) override; 88 const RetrievePolicyCallback& callback) override;
89 std::string BlockingRetrieveDeviceLocalAccountPolicy(
90 const std::string& account_id) override;
88 void StoreDevicePolicy(const std::string& policy_blob, 91 void StoreDevicePolicy(const std::string& policy_blob,
89 const StorePolicyCallback& callback) override; 92 const StorePolicyCallback& callback) override;
90 void StoreDeviceLocalAccountPolicy( 93 void StoreDeviceLocalAccountPolicy(
91 const std::string& account_id, 94 const std::string& account_id,
92 const std::string& policy_blob, 95 const std::string& policy_blob,
93 const StorePolicyCallback& callback) override; 96 const StorePolicyCallback& callback) override;
94 97
95 private: 98 private:
96 struct PolicyState { 99 struct PolicyState {
97 bool store_result_; 100 bool store_result_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 166
164 std::unique_ptr<DBusThreadManagerSetter> dbus_setter_; 167 std::unique_ptr<DBusThreadManagerSetter> dbus_setter_;
165 168
166 private: 169 private:
167 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); 170 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase);
168 }; 171 };
169 172
170 } // namespace chromeos 173 } // namespace chromeos
171 174
172 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ 175 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698