Home
last modified time | relevance | path

Searched refs:policy_data (Results 1 – 25 of 53) sorted by relevance

123

/external/chromium_org/chrome/browser/chromeos/settings/
Ddevice_settings_service_unittest.cc70 ASSERT_TRUE(device_settings_service_.policy_data()); in CheckPolicy()
71 EXPECT_EQ(device_policy_.policy_data().SerializeAsString(), in CheckPolicy()
72 device_settings_service_.policy_data()->SerializeAsString()); in CheckPolicy()
93 EXPECT_FALSE(device_settings_service_.policy_data()); in TEST_F()
103 EXPECT_FALSE(device_settings_service_.policy_data()); in TEST_F()
115 EXPECT_FALSE(device_settings_service_.policy_data()); in TEST_F()
122 device_policy_.policy_data().set_timestamp( in TEST_F()
170 InitOwner(device_policy_.policy_data().username(), true); in TEST_F()
196 InitOwner(device_policy_.policy_data().username(), true); in TEST_F()
218 const em::PolicyData* policy_data = device_settings_service_.policy_data(); in TEST_F() local
[all …]
Dsession_manager_operation_unittest.cc105 EXPECT_FALSE(op.policy_data().get()); in TEST_F()
141 ASSERT_TRUE(op.policy_data().get()); in TEST_F()
142 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
143 op.policy_data()->SerializeAsString()); in TEST_F()
182 ASSERT_TRUE(op.policy_data().get()); in TEST_F()
183 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
184 op.policy_data()->SerializeAsString()); in TEST_F()
206 ASSERT_TRUE(op.policy_data().get()); in TEST_F()
207 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
208 op.policy_data()->SerializeAsString()); in TEST_F()
[all …]
Ddevice_settings_provider.cc178 em::PolicyData policy_data; in RetrieveCachedData() local
179 if (!device_settings_cache::Retrieve(&policy_data, in RetrieveCachedData()
181 !device_settings_.ParseFromString(policy_data.policy_value())) { in RetrieveCachedData()
185 UpdateValuesCache(policy_data, device_settings_, trusted_status_); in RetrieveCachedData()
779 const em::PolicyData& policy_data, in UpdateValuesCache() argument
784 if (policy_data.has_username() && !policy_data.has_request_token()) in UpdateValuesCache()
785 new_values_cache.SetString(kDeviceOwner, policy_data.username()); in UpdateValuesCache()
787 if (policy_data.has_service_account_identity()) { in UpdateValuesCache()
789 policy_data.service_account_identity()); in UpdateValuesCache()
927 const em::PolicyData* policy_data = in UpdateFromService() local
[all …]
/external/chromium_org/components/policy/core/common/cloud/
Dcloud_policy_validator_unittest.cc113 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in CheckSuccessfulValidation()
114 validator->policy_data()->SerializeAsString()); in CheckSuccessfulValidation()
157 policy_.policy_data().clear_request_token(); in TEST_F()
163 policy_.policy_data().set_username( in TEST_F()
169 policy_.policy_data().clear_policy_type(); in TEST_F()
174 policy_.policy_data().set_policy_type("invalid"); in TEST_F()
179 policy_.policy_data().clear_timestamp(); in TEST_F()
185 policy_.policy_data().clear_timestamp(); in TEST_F()
191 policy_.policy_data().set_timestamp( in TEST_F()
198 policy_.policy_data().set_timestamp( in TEST_F()
[all …]
Dcomponent_cloud_policy_updater_unittest.cc103 builder_.policy_data().set_policy_type( in SetUp()
105 builder_.policy_data().set_settings_entity_id(kTestExtension); in SetUp()
158 builder_.policy_data().set_settings_entity_id(kTestExtension2); in TEST_F()
161 builder_.policy_data().set_settings_entity_id(kTestExtension3); in TEST_F()
178 builder_.policy_data().set_username("wronguser@example.com"); in TEST_F()
182 builder_.policy_data().set_username(ComponentPolicyBuilder::kFakeUsername); in TEST_F()
183 builder_.policy_data().set_settings_entity_id(kTestExtension2); in TEST_F()
186 builder_.policy_data().set_settings_entity_id(kTestExtension3); in TEST_F()
225 builder_.policy_data().set_settings_entity_id(kTestExtension2); in TEST_F()
227 builder_.policy_data().set_settings_entity_id(kTestExtension3); in TEST_F()
Dcomponent_cloud_policy_store.cc251 em::PolicyData policy_data; in ValidatePolicy() local
253 proto.Pass(), std::string(), std::string(), payload, &policy_data)) { in ValidatePolicy()
257 if (!policy_data.has_policy_type()) in ValidatePolicy()
261 GetDomainConstantsForType(policy_data.policy_type()); in ValidatePolicy()
262 if (!constants || !policy_data.has_settings_entity_id()) in ValidatePolicy()
266 ns->component_id = policy_data.settings_entity_id(); in ValidatePolicy()
275 em::PolicyData* policy_data) { in ValidateProto() argument
311 if (policy_data) in ValidateProto()
312 policy_data->Swap(validator->policy_data().get()); in ValidateProto()
Dcomponent_cloud_policy_store_unittest.cc80 builder_.policy_data().set_policy_type( in SetUp()
82 builder_.policy_data().set_settings_entity_id(kTestExtension); in SetUp()
128 builder_.policy_data().set_username("anotheruser@example.com"); in TEST_F()
135 builder_.policy_data().set_request_token("notmytoken"); in TEST_F()
142 builder_.policy_data().set_policy_type(dm_protocol::kChromeUserPolicyType); in TEST_F()
166 builder_.policy_data().set_policy_value("broken"); in TEST_F()
215 builder_.policy_data().set_policy_type(dm_protocol::kChromeUserPolicyType); in TEST_F()
220 builder_.policy_data().set_policy_type( in TEST_F()
Dcloud_policy_client.cc397 em::PolicyData policy_data; in OnPolicyFetchCompleted() local
398 if (!policy_data.ParseFromString(response.policy_data()) || in OnPolicyFetchCompleted()
399 !policy_data.IsInitialized() || in OnPolicyFetchCompleted()
400 !policy_data.has_policy_type()) { in OnPolicyFetchCompleted()
404 const std::string& type = policy_data.policy_type(); in OnPolicyFetchCompleted()
406 if (policy_data.has_settings_entity_id()) in OnPolicyFetchCompleted()
407 entity_id = policy_data.settings_entity_id(); in OnPolicyFetchCompleted()
Duser_cloud_policy_store_base.cc43 scoped_ptr<enterprise_management::PolicyData> policy_data, in InstallPolicy() argument
48 policy_ = policy_data.Pass(); in InstallPolicy()
Dcloud_policy_validator.cc149 const em::PolicyData* policy_data, in ValidateAgainstCurrentPolicy() argument
154 if (policy_data) { in ValidateAgainstCurrentPolicy()
157 base::TimeDelta::FromMilliseconds(policy_data->timestamp()); in ValidateAgainstCurrentPolicy()
158 expected_dm_token = policy_data->request_token(); in ValidateAgainstCurrentPolicy()
231 if (!policy_data_->ParseFromString(policy_->policy_data()) || in RunChecks()
368 !VerifySignature(policy_->policy_data(), *signature_key, in CheckSignature()
380 !VerifySignature(policy_->policy_data(), policy_->new_public_key(), in CheckInitialKey()
Duser_cloud_policy_store.cc286 validator->policy_data()->request_token(); in InstallLoadedPolicyAfterValidation()
287 DVLOG(1) << "Device ID: " << validator->policy_data()->device_id(); in InstallLoadedPolicyAfterValidation()
292 validator->policy_data()->clear_public_key_version(); in InstallLoadedPolicyAfterValidation()
299 InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass()); in InstallLoadedPolicyAfterValidation()
434 InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass()); in StorePolicyAfterValidation()
Dcloud_policy_manager_unittest.cc223 store_.policy_.reset(new em::PolicyData(policy_.policy_data())); in TEST_F()
255 client->SetDMToken(policy_.policy_data().request_token()); in TEST_F()
305 store_.policy_.reset(new em::PolicyData(policy_.policy_data())); in TEST_F()
313 client->SetDMToken(policy_.policy_data().request_token()); in TEST_F()
345 store_.policy_.reset(new em::PolicyData(policy_.policy_data())); in TEST_F()
Dpolicy_builder.cc251 SignData(policy_.policy_data(), policy_signing_key.get(), in Build()
311 policy_data().set_policy_type(dm_protocol::kChromeUserPolicyType); in TypedPolicyBuilder()
321 policy_data().set_policy_type(dm_protocol::kChromeExtensionPolicyType); in TypedPolicyBuilder()
Dpolicy_builder.h46 enterprise_management::PolicyData& policy_data() { in policy_data() function
139 CHECK(payload_->SerializeToString(policy_data().mutable_policy_value())); in Build()
Dcloud_policy_client_unittest.cc181 em::PolicyData policy_data; in CreatePolicyData() local
182 policy_data.set_policy_type(dm_protocol::kChromeUserPolicyType); in CreatePolicyData()
183 policy_data.set_policy_value(policy_value); in CreatePolicyData()
184 return policy_data.SerializeAsString(); in CreatePolicyData()
495 em::PolicyData policy_data; in TEST_F() local
496 policy_data.set_policy_type(key.first); in TEST_F()
497 policy_data.set_settings_entity_id(key.second); in TEST_F()
498 expected_responses[key].set_policy_data(policy_data.SerializeAsString()); in TEST_F()
Duser_cloud_policy_store_unittest.cc235 EXPECT_EQ(unsigned_builder.policy_data().SerializeAsString(), in TEST_F()
259 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
354 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
379 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
405 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
414 policy_.policy_data().clear_policy_type(); in TEST_F()
/external/chromium_org/tools/grit/grit/format/policy_templates/
Dtemplate_formatter.py44 policy_data = _ParseGritNodes(root, lang)
46 policy_template_generator.PolicyTemplateGenerator(config, policy_data)
62 policy_data = None
67 assert policy_data is None
72 policy_data = eval(json_text)
73 return policy_data
Dpolicy_template_generator_unittest.py22 def do_test(self, policy_data, writer): argument
44 if not 'messages' in policy_data:
45 policy_data['messages'] = {}
46 if not 'placeholders' in policy_data:
47 policy_data['placeholders'] = []
48 if not 'policy_definitions' in policy_data:
49 policy_data['policy_definitions'] = []
52 policy_data)
351 policy_data = {
368 self.do_test(policy_data, LocalMockWriter())
Dpolicy_template_generator.py30 def __init__(self, config, policy_data): argument
44 self._policy_data = copy.deepcopy(policy_data)
/external/chromium_org/chrome/browser/chromeos/policy/
Ddevice_cloud_policy_store_chromeos.cc46 !device_settings_service_->policy_data() || !public_key.get() || in Store()
59 device_settings_service_->policy_data(), in Store()
156 device_settings_service_->policy_data() && in UpdateFromService()
157 device_settings_service_->policy_data()->has_request_token(); in UpdateFromService()
185 if (device_settings_service_->policy_data()) in UpdateFromService()
186 policy_->MergeFrom(*device_settings_service_->policy_data()); in UpdateFromService()
Ddevice_local_account_policy_service_unittest.cc146 device_local_account_policy_.policy_data().set_policy_type( in SetUp()
171 device_local_account_policy_.policy_data().set_settings_entity_id(account_id); in InstallDeviceLocalAccountPolicy()
172 device_local_account_policy_.policy_data().set_username(account_id); in InstallDeviceLocalAccountPolicy()
250 device_local_account_policy_.policy_data().set_policy_type( in TEST_F()
281 EXPECT_EQ(device_local_account_policy_.policy_data().SerializeAsString(), in TEST_F()
300 device_local_account_policy_.policy_data().set_policy_type( in TEST_F()
326 device_local_account_policy_.policy_data().set_settings_entity_id(kAccount1); in TEST_F()
327 device_local_account_policy_.policy_data().set_username(kAccount1); in TEST_F()
335 EXPECT_EQ(device_local_account_policy_.policy_data().SerializeAsString(), in TEST_F()
373 EXPECT_EQ(device_local_account_policy_.policy_data().SerializeAsString(), in TEST_F()
[all …]
Ddevice_local_account_policy_service.cc58 const em::PolicyData* policy_data = device_settings_service->policy_data(); in CreateClient() local
59 if (!policy_data || in CreateClient()
60 !policy_data->has_request_token() || in CreateClient()
61 !policy_data->has_device_id() || in CreateClient()
75 client->SetupRegistration(policy_data->request_token(), in CreateClient()
76 policy_data->device_id()); in CreateClient()
Duser_cloud_policy_store_chromeos_unittest.cc189 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in PerformStorePolicy()
346 policy_.policy_data().clear_policy_type(); in TEST_F()
405 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
433 policy_.policy_data().clear_policy_type(); in TEST_F()
478 cached_policy.cloud_policy().policy_data())); in TEST_F()
505 cached_policy.cloud_policy().policy_data())); in TEST_F()
555 cached_policy.cloud_policy().policy_data())); in TEST_F()
599 EXPECT_EQ(policy_.policy_data().SerializeAsString(), in TEST_F()
/external/chromium_org/chrome/browser/policy/test/
Dpolicy_testserver.py739 policy_data = dm.PolicyData()
740 policy_data.policy_type = msg.policy_type
741 policy_data.timestamp = int(time.time() * 1000)
742 policy_data.request_token = token_info['device_token']
743 policy_data.policy_value = payload
744 policy_data.machine_name = token_info['machine_name']
745 policy_data.valid_serial_number_missing = (
747 policy_data.settings_entity_id = msg.settings_entity_id
748 policy_data.service_account_identity = policy.get(
753 policy_data.invalidation_source = invalidation_source
[all …]
/external/chromium_org/chrome/browser/search_engines/
Ddefault_search_manager_unittest.cc262 scoped_ptr<TemplateURLData> policy_data = in TEST_F() local
264 SetPolicy(pref_service(), true, policy_data.get()); in TEST_F()
266 ExpectSimilar(policy_data.get(), manager.GetDefaultSearchEngine(&source)); in TEST_F()
300 scoped_ptr<TemplateURLData> policy_data = in TEST_F() local
302 SetPolicy(pref_service(), true, policy_data.get()); in TEST_F()
304 ExpectSimilar(policy_data.get(), manager.GetDefaultSearchEngine(&source)); in TEST_F()

123