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

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

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 2 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) 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // If reboot didn't happen, ask user to reboot device manually. 69 // If reboot didn't happen, ask user to reboot device manually.
70 const int kWaitForRebootTimeSec = 3; 70 const int kWaitForRebootTimeSec = 3;
71 71
72 // Interval in ms which is used for smooth screen showing. 72 // Interval in ms which is used for smooth screen showing.
73 static int kShowDelayMs = 400; 73 static int kShowDelayMs = 400;
74 74
75 // Saves boolean "Local State" preference and forces its persistence to disk. 75 // Saves boolean "Local State" preference and forces its persistence to disk.
76 void SaveBoolPreferenceForced(const char* pref_name, bool value) { 76 void SaveBoolPreferenceForced(const char* pref_name, bool value) {
77 PrefService* prefs = g_browser_process->local_state(); 77 PrefService* prefs = g_browser_process->local_state();
78 prefs->SetBoolean(pref_name, value); 78 prefs->SetBoolean(pref_name, value);
79 prefs->SavePersistentPrefs(); 79 prefs->CommitPendingWrite();
80 } 80 }
81 81
82 // Saves integer "Local State" preference and forces its persistence to disk. 82 // Saves integer "Local State" preference and forces its persistence to disk.
83 void SaveIntegerPreferenceForced(const char* pref_name, int value) { 83 void SaveIntegerPreferenceForced(const char* pref_name, int value) {
84 PrefService* prefs = g_browser_process->local_state(); 84 PrefService* prefs = g_browser_process->local_state();
85 prefs->SetInteger(pref_name, value); 85 prefs->SetInteger(pref_name, value);
86 prefs->SavePersistentPrefs(); 86 prefs->CommitPendingWrite();
87 } 87 }
88 88
89 // Saves string "Local State" preference and forces its persistence to disk. 89 // Saves string "Local State" preference and forces its persistence to disk.
90 void SaveStringPreferenceForced(const char* pref_name, 90 void SaveStringPreferenceForced(const char* pref_name,
91 const std::string& value) { 91 const std::string& value) {
92 PrefService* prefs = g_browser_process->local_state(); 92 PrefService* prefs = g_browser_process->local_state();
93 prefs->SetString(pref_name, value); 93 prefs->SetString(pref_name, value);
94 prefs->SavePersistentPrefs(); 94 prefs->CommitPendingWrite();
95 } 95 }
96 96
97 } // namespace 97 } // namespace
98 98
99 namespace chromeos { 99 namespace chromeos {
100 100
101 const char WizardController::kNetworkScreenName[] = "network"; 101 const char WizardController::kNetworkScreenName[] = "network";
102 const char WizardController::kLoginScreenName[] = "login"; 102 const char WizardController::kLoginScreenName[] = "login";
103 const char WizardController::kUpdateScreenName[] = "update"; 103 const char WizardController::kUpdateScreenName[] = "update";
104 const char WizardController::kUserImageScreenName[] = "image"; 104 const char WizardController::kUserImageScreenName[] = "image";
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 bool WizardController::usage_statistics_reporting() const { 710 bool WizardController::usage_statistics_reporting() const {
711 return usage_statistics_reporting_; 711 return usage_statistics_reporting_;
712 } 712 }
713 713
714 void WizardController::SetZeroDelays() { 714 void WizardController::SetZeroDelays() {
715 kShowDelayMs = 0; 715 kShowDelayMs = 0;
716 } 716 }
717 717
718 } // namespace chromeos 718 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698