| 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/customization_document.h" | 5 #include "chrome/browser/chromeos/customization_document.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 // static | 214 // static |
| 215 ServicesCustomizationDocument* ServicesCustomizationDocument::GetInstance() { | 215 ServicesCustomizationDocument* ServicesCustomizationDocument::GetInstance() { |
| 216 return Singleton<ServicesCustomizationDocument, | 216 return Singleton<ServicesCustomizationDocument, |
| 217 DefaultSingletonTraits<ServicesCustomizationDocument> >::get(); | 217 DefaultSingletonTraits<ServicesCustomizationDocument> >::get(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 // static | 220 // static |
| 221 void ServicesCustomizationDocument::RegisterPrefs(PrefService* local_state) { | 221 void ServicesCustomizationDocument::RegisterPrefs(PrefService* local_state) { |
| 222 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref, false); | 222 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref, false, |
| 223 false /* don't sync pref */); |
| 223 } | 224 } |
| 224 | 225 |
| 225 // static | 226 // static |
| 226 bool ServicesCustomizationDocument::WasApplied() { | 227 bool ServicesCustomizationDocument::WasApplied() { |
| 227 PrefService* prefs = g_browser_process->local_state(); | 228 PrefService* prefs = g_browser_process->local_state(); |
| 228 return prefs->GetBoolean(kServicesCustomizationAppliedPref); | 229 return prefs->GetBoolean(kServicesCustomizationAppliedPref); |
| 229 } | 230 } |
| 230 | 231 |
| 231 // static | 232 // static |
| 232 void ServicesCustomizationDocument::SetApplied(bool val) { | 233 void ServicesCustomizationDocument::SetApplied(bool val) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 locale, kAppContentAttr, kInitialStartPageAttr); | 305 locale, kAppContentAttr, kInitialStartPageAttr); |
| 305 } | 306 } |
| 306 | 307 |
| 307 std::string ServicesCustomizationDocument::GetSupportPage( | 308 std::string ServicesCustomizationDocument::GetSupportPage( |
| 308 const std::string& locale) const { | 309 const std::string& locale) const { |
| 309 return GetLocaleSpecificString( | 310 return GetLocaleSpecificString( |
| 310 locale, kAppContentAttr, kSupportPageAttr); | 311 locale, kAppContentAttr, kSupportPageAttr); |
| 311 } | 312 } |
| 312 | 313 |
| 313 } // namespace chromeos | 314 } // namespace chromeos |
| OLD | NEW |