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

Side by Side Diff: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc

Issue 1266563002: Added affiliation IDs for the new affiliation determination. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 device_management_service(), 373 device_management_service(),
374 consumer_device_management_service_.get(), 374 consumer_device_management_service_.get(),
375 GetBackgroundTaskRunner(), 375 GetBackgroundTaskRunner(),
376 install_attributes_.get(), 376 install_attributes_.get(),
377 state_keys_broker_.get(), 377 state_keys_broker_.get(),
378 device_cloud_policy_manager_->device_store(), 378 device_cloud_policy_manager_->device_store(),
379 device_cloud_policy_manager_)); 379 device_cloud_policy_manager_));
380 device_cloud_policy_initializer_->Init(); 380 device_cloud_policy_initializer_->Init();
381 } 381 }
382 382
383 std::set<std::string> BrowserPolicyConnectorChromeOS::GetDeviceAffiliationIDs()
384 const {
385 std::set<std::string> affiliation_ids;
386 if (device_cloud_policy_manager_) {
387 const enterprise_management::PolicyData* const policy_data =
388 device_cloud_policy_manager_->device_store()->policy();
389 if (policy_data) {
390 for (int i = 0; i < policy_data->device_affiliation_ids_size(); ++i) {
391 affiliation_ids.insert(policy_data->device_affiliation_ids(i));
392 }
Mattias Nissler (ping if slow) 2015/07/29 20:08:13 Instead of the loop, I think you can just do this:
peletskyi 2015/07/30 11:02:27 Done.
393 }
394 }
395 return affiliation_ids;
396 }
397
383 } // namespace policy 398 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698