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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 375 } |
376 | 376 |
377 void WizardController::OnEulaAccepted() { | 377 void WizardController::OnEulaAccepted() { |
378 MarkEulaAccepted(); | 378 MarkEulaAccepted(); |
379 // TODO(pastarmovj): Make this code cache the value for the pref in a better | 379 // TODO(pastarmovj): Make this code cache the value for the pref in a better |
380 // way until we can store it in the policy blob. See explanation below: | 380 // way until we can store it in the policy blob. See explanation below: |
381 // At this point we can not write this in the signed settings pref blob. | 381 // At this point we can not write this in the signed settings pref blob. |
382 // But we can at least create the consent file and Chrome would port that | 382 // But we can at least create the consent file and Chrome would port that |
383 // if the device is owned by a local user. In case of enterprise enrolled | 383 // if the device is owned by a local user. In case of enterprise enrolled |
384 // device the setting will be respected only until the policy is not set. | 384 // device the setting will be respected only until the policy is not set. |
| 385 base::FundamentalValue value(usage_statistics_reporting_); |
385 SignedSettingsTempStorage::Store( | 386 SignedSettingsTempStorage::Store( |
386 kStatsReportingPref, | 387 kStatsReportingPref, |
387 (usage_statistics_reporting_ ? "true" : "false"), | 388 value, |
388 g_browser_process->local_state()); | 389 g_browser_process->local_state()); |
389 bool enabled = | 390 bool enabled = |
390 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); | 391 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); |
391 // Make sure the local state cached value is updated too because the real | 392 // Make sure the local state cached value is updated too because the real |
392 // policy will only get written when the owner is created and the cache won't | 393 // policy will only get written when the owner is created and the cache won't |
393 // be updated until the policy is reread. | 394 // be updated until the policy is reread. |
394 g_browser_process->local_state()->SetBoolean(kStatsReportingPref, enabled); | 395 g_browser_process->local_state()->SetBoolean(kStatsReportingPref, enabled); |
395 if (enabled) { | 396 if (enabled) { |
396 #if defined(USE_LINUX_BREAKPAD) | 397 #if defined(USE_LINUX_BREAKPAD) |
397 // The crash reporter initialization needs IO to complete. | 398 // The crash reporter initialization needs IO to complete. |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 | 694 |
694 bool WizardController::usage_statistics_reporting() const { | 695 bool WizardController::usage_statistics_reporting() const { |
695 return usage_statistics_reporting_; | 696 return usage_statistics_reporting_; |
696 } | 697 } |
697 | 698 |
698 void WizardController::SetZeroDelays() { | 699 void WizardController::SetZeroDelays() { |
699 kShowDelayMs = 0; | 700 kShowDelayMs = 0; |
700 } | 701 } |
701 | 702 |
702 } // namespace chromeos | 703 } // namespace chromeos |
OLD | NEW |