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

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 the nits and rebased on ToT (which now has PART1 in). 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/signed_settings_unittest.cc ('k') | chrome/browser/chromeos/proxy_config_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698