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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 9 years, 8 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/apply_services_customization.h" 5 #include "chrome/browser/chromeos/login/apply_services_customization.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 new ApplyServicesCustomization(kServicesCustomizationManifestUrl); 48 new ApplyServicesCustomization(kServicesCustomizationManifestUrl);
49 if (!object->Init()) { 49 if (!object->Init()) {
50 delete object; 50 delete object;
51 } 51 }
52 // |object| will be deleted on download complete. 52 // |object| will be deleted on download complete.
53 } 53 }
54 } 54 }
55 55
56 // static 56 // static
57 void ApplyServicesCustomization::RegisterPrefs(PrefService* local_state) { 57 void ApplyServicesCustomization::RegisterPrefs(PrefService* local_state) {
58 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref, false); 58 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref,
59 false,
60 false /* don't sync pref */);
59 } 61 }
60 62
61 // static 63 // static
62 bool ApplyServicesCustomization::IsApplied() { 64 bool ApplyServicesCustomization::IsApplied() {
63 PrefService* prefs = g_browser_process->local_state(); 65 PrefService* prefs = g_browser_process->local_state();
64 return prefs->GetBoolean(kServicesCustomizationAppliedPref); 66 return prefs->GetBoolean(kServicesCustomizationAppliedPref);
65 } 67 }
66 68
67 // static 69 // static
68 void ApplyServicesCustomization::SetApplied(bool val) { 70 void ApplyServicesCustomization::SetApplied(bool val) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Exit here to don't safe that manifest was applied. 167 // Exit here to don't safe that manifest was applied.
166 return; 168 return;
167 } 169 }
168 } 170 }
169 // TODO(dpolukhin): apply customized apps, exts and support page. 171 // TODO(dpolukhin): apply customized apps, exts and support page.
170 172
171 SetApplied(true); 173 SetApplied(true);
172 } 174 }
173 175
174 } // namespace chromeos 176 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698