OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 | 386 |
387 void WizardController::OnEulaAccepted() { | 387 void WizardController::OnEulaAccepted() { |
388 MarkEulaAccepted(); | 388 MarkEulaAccepted(); |
389 // TODO(pastarmovj): Make this code cache the value for the pref in a better | 389 // TODO(pastarmovj): Make this code cache the value for the pref in a better |
390 // way until we can store it in the policy blob. See explanation below: | 390 // way until we can store it in the policy blob. See explanation below: |
391 // At this point we can not write this in the signed settings pref blob. | 391 // At this point we can not write this in the signed settings pref blob. |
392 // But we can at least create the consent file and Chrome would port that | 392 // But we can at least create the consent file and Chrome would port that |
393 // if the device is owned by a local user. In case of enterprise enrolled | 393 // if the device is owned by a local user. In case of enterprise enrolled |
394 // device the setting will be respected only until the policy is not set. | 394 // device the setting will be respected only until the policy is not set. |
| 395 base::FundamentalValue value(usage_statistics_reporting_); |
395 SignedSettingsTempStorage::Store( | 396 SignedSettingsTempStorage::Store( |
396 kStatsReportingPref, | 397 kStatsReportingPref, |
397 (usage_statistics_reporting_ ? "true" : "false"), | 398 value, |
398 g_browser_process->local_state()); | 399 g_browser_process->local_state()); |
399 bool enabled = | 400 bool enabled = |
400 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 401 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
401 // Make sure the local state cached value is updated too because the real | 402 // Make sure the local state cached value is updated too because the real |
402 // policy will only get written when the owner is created and the cache won't | 403 // policy will only get written when the owner is created and the cache won't |
403 // be updated until the policy is reread. | 404 // be updated until the policy is reread. |
404 g_browser_process->local_state()->SetBoolean(kStatsReportingPref, enabled); | 405 g_browser_process->local_state()->SetBoolean(kStatsReportingPref, enabled); |
405 if (enabled) { | 406 if (enabled) { |
406 #if defined(USE_LINUX_BREAKPAD) | 407 #if defined(USE_LINUX_BREAKPAD) |
407 // The crash reporter initialization needs IO to complete. | 408 // The crash reporter initialization needs IO to complete. |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 | 710 |
710 bool WizardController::usage_statistics_reporting() const { | 711 bool WizardController::usage_statistics_reporting() const { |
711 return usage_statistics_reporting_; | 712 return usage_statistics_reporting_; |
712 } | 713 } |
713 | 714 |
714 void WizardController::SetZeroDelays() { | 715 void WizardController::SetZeroDelays() { |
715 kShowDelayMs = 0; | 716 kShowDelayMs = 0; |
716 } | 717 } |
717 | 718 |
718 } // namespace chromeos | 719 } // namespace chromeos |
OLD | NEW |