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

Side by Side Diff: chrome/browser/policy/device_policy_cache.cc

Issue 9289017: Apply individual policies for the various parts of device status reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Julian's comments. Created 8 years, 10 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 | Annotate | Revision Log
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 #include "chrome/browser/policy/device_policy_cache.h" 5 #include "chrome/browser/policy/device_policy_cache.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 if (policy.has_open_network_configuration() && 362 if (policy.has_open_network_configuration() &&
363 policy.open_network_configuration().has_open_network_configuration()) { 363 policy.open_network_configuration().has_open_network_configuration()) {
364 std::string config( 364 std::string config(
365 policy.open_network_configuration().open_network_configuration()); 365 policy.open_network_configuration().open_network_configuration());
366 policies->Set(key::kDeviceOpenNetworkConfiguration, 366 policies->Set(key::kDeviceOpenNetworkConfiguration,
367 POLICY_LEVEL_MANDATORY, 367 POLICY_LEVEL_MANDATORY,
368 POLICY_SCOPE_MACHINE, 368 POLICY_SCOPE_MACHINE,
369 Value::CreateStringValue(config)); 369 Value::CreateStringValue(config));
370 } 370 }
371
372 if (policy.has_device_reporting()) {
373 if (policy.device_reporting().has_report_version_info()) {
374 bool enabled = policy.device_reporting().report_version_info();
375 policies->Set(key::kReportDeviceVersionInfo,
376 POLICY_LEVEL_MANDATORY,
377 POLICY_SCOPE_MACHINE,
378 Value::CreateBooleanValue(enabled));
379 }
380 if (policy.device_reporting().has_report_activity_times()) {
381 bool enabled = policy.device_reporting().report_activity_times();
382 policies->Set(key::kReportDeviceActivityTimes,
383 POLICY_LEVEL_MANDATORY,
384 POLICY_SCOPE_MACHINE,
385 Value::CreateBooleanValue(enabled));
386 }
387 }
388
389 } 371 }
390 372
391 } // namespace policy 373 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler_list.cc ('k') | chrome/browser/policy/device_status_collector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698