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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 8091002: PART2: Make SignedSettings use proper Value types instead of string all around the place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and fixed an issue with user whitelist checks. Created 9 years, 1 month 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) 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 384 }
385 385
386 void WizardController::OnEulaAccepted() { 386 void WizardController::OnEulaAccepted() {
387 MarkEulaAccepted(); 387 MarkEulaAccepted();
388 // TODO(pastarmovj): Make this code cache the value for the pref in a better 388 // TODO(pastarmovj): Make this code cache the value for the pref in a better
389 // way until we can store it in the policy blob. See explanation below: 389 // way until we can store it in the policy blob. See explanation below:
390 // At this point we can not write this in the signed settings pref blob. 390 // At this point we can not write this in the signed settings pref blob.
391 // But we can at least create the consent file and Chrome would port that 391 // But we can at least create the consent file and Chrome would port that
392 // if the device is owned by a local user. In case of enterprise enrolled 392 // if the device is owned by a local user. In case of enterprise enrolled
393 // device the setting will be respected only until the policy is not set. 393 // device the setting will be respected only until the policy is not set.
394 base::FundamentalValue value(usage_statistics_reporting_);
394 SignedSettingsTempStorage::Store( 395 SignedSettingsTempStorage::Store(
395 kStatsReportingPref, 396 kStatsReportingPref,
396 (usage_statistics_reporting_ ? "true" : "false"), 397 value,
397 g_browser_process->local_state()); 398 g_browser_process->local_state());
398 bool enabled = 399 bool enabled =
399 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_); 400 OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_);
400 // Make sure the local state cached value is updated too because the real 401 // Make sure the local state cached value is updated too because the real
401 // policy will only get written when the owner is created and the cache won't 402 // policy will only get written when the owner is created and the cache won't
402 // be updated until the policy is reread. 403 // be updated until the policy is reread.
403 g_browser_process->local_state()->SetBoolean(kStatsReportingPref, enabled); 404 g_browser_process->local_state()->SetBoolean(kStatsReportingPref, enabled);
404 if (enabled) { 405 if (enabled) {
405 #if defined(USE_LINUX_BREAKPAD) 406 #if defined(USE_LINUX_BREAKPAD)
406 // The crash reporter initialization needs IO to complete. 407 // The crash reporter initialization needs IO to complete.
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 709
709 bool WizardController::usage_statistics_reporting() const { 710 bool WizardController::usage_statistics_reporting() const {
710 return usage_statistics_reporting_; 711 return usage_statistics_reporting_;
711 } 712 }
712 713
713 void WizardController::SetZeroDelays() { 714 void WizardController::SetZeroDelays() {
714 kShowDelayMs = 0; 715 kShowDelayMs = 0;
715 } 716 }
716 717
717 } // namespace chromeos 718 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698