| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 ServicesCustomizationDocument::~ServicesCustomizationDocument() {} | 242 ServicesCustomizationDocument::~ServicesCustomizationDocument() {} |
| 243 | 243 |
| 244 // static | 244 // static |
| 245 ServicesCustomizationDocument* ServicesCustomizationDocument::GetInstance() { | 245 ServicesCustomizationDocument* ServicesCustomizationDocument::GetInstance() { |
| 246 return Singleton<ServicesCustomizationDocument, | 246 return Singleton<ServicesCustomizationDocument, |
| 247 DefaultSingletonTraits<ServicesCustomizationDocument> >::get(); | 247 DefaultSingletonTraits<ServicesCustomizationDocument> >::get(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 // static | 250 // static |
| 251 void ServicesCustomizationDocument::RegisterPrefs(PrefService* local_state) { | 251 void ServicesCustomizationDocument::RegisterPrefs( |
| 252 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref, false, | 252 PrefServiceSimple* local_state) { |
| 253 PrefService::UNSYNCABLE_PREF); | 253 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref, false); |
| 254 } | 254 } |
| 255 | 255 |
| 256 // static | 256 // static |
| 257 bool ServicesCustomizationDocument::WasApplied() { | 257 bool ServicesCustomizationDocument::WasApplied() { |
| 258 PrefService* prefs = g_browser_process->local_state(); | 258 PrefService* prefs = g_browser_process->local_state(); |
| 259 return prefs->GetBoolean(kServicesCustomizationAppliedPref); | 259 return prefs->GetBoolean(kServicesCustomizationAppliedPref); |
| 260 } | 260 } |
| 261 | 261 |
| 262 // static | 262 // static |
| 263 void ServicesCustomizationDocument::SetApplied(bool val) { | 263 void ServicesCustomizationDocument::SetApplied(bool val) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 locale, kAppContentAttr, kInitialStartPageAttr); | 335 locale, kAppContentAttr, kInitialStartPageAttr); |
| 336 } | 336 } |
| 337 | 337 |
| 338 std::string ServicesCustomizationDocument::GetSupportPage( | 338 std::string ServicesCustomizationDocument::GetSupportPage( |
| 339 const std::string& locale) const { | 339 const std::string& locale) const { |
| 340 return GetLocaleSpecificString( | 340 return GetLocaleSpecificString( |
| 341 locale, kAppContentAttr, kSupportPageAttr); | 341 locale, kAppContentAttr, kSupportPageAttr); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace chromeos | 344 } // namespace chromeos |
| OLD | NEW |