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

Side by Side Diff: chrome/browser/chromeos/customization_document.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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) 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"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chromeos/cros/cros_library.h" 17 #include "chrome/browser/chromeos/cros/cros_library.h"
18 #include "chrome/browser/chromeos/cros/network_library.h" 18 #include "chrome/browser/chromeos/cros/network_library.h"
19 #include "chrome/browser/chromeos/login/wizard_controller.h" 19 #include "chrome/browser/chromeos/login/wizard_controller.h"
20 #include "chrome/browser/chromeos/system/statistics_provider.h" 20 #include "chrome/browser/chromeos/system/statistics_provider.h"
21 #include "chrome/browser/prefs/pref_registry_simple.h"
21 #include "chrome/browser/prefs/pref_service.h" 22 #include "chrome/browser/prefs/pref_service.h"
22 #include "chrome/browser/profiles/profile_manager.h" 23 #include "chrome/browser/profiles/profile_manager.h"
23 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
24 #include "net/url_request/url_fetcher.h" 25 #include "net/url_request/url_fetcher.h"
25 26
26 using content::BrowserThread; 27 using content::BrowserThread;
27 28
28 // Manifest attributes names. 29 // Manifest attributes names.
29 30
30 namespace { 31 namespace {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 ServicesCustomizationDocument::~ServicesCustomizationDocument() {} 242 ServicesCustomizationDocument::~ServicesCustomizationDocument() {}
242 243
243 // static 244 // static
244 ServicesCustomizationDocument* ServicesCustomizationDocument::GetInstance() { 245 ServicesCustomizationDocument* ServicesCustomizationDocument::GetInstance() {
245 return Singleton<ServicesCustomizationDocument, 246 return Singleton<ServicesCustomizationDocument,
246 DefaultSingletonTraits<ServicesCustomizationDocument> >::get(); 247 DefaultSingletonTraits<ServicesCustomizationDocument> >::get();
247 } 248 }
248 249
249 // static 250 // static
250 void ServicesCustomizationDocument::RegisterPrefs( 251 void ServicesCustomizationDocument::RegisterPrefs(
251 PrefServiceSimple* local_state) { 252 PrefRegistrySimple* registry) {
252 local_state->RegisterBooleanPref(kServicesCustomizationAppliedPref, false); 253 registry->RegisterBooleanPref(kServicesCustomizationAppliedPref, false);
253 } 254 }
254 255
255 // static 256 // static
256 bool ServicesCustomizationDocument::WasApplied() { 257 bool ServicesCustomizationDocument::WasApplied() {
257 PrefService* prefs = g_browser_process->local_state(); 258 PrefService* prefs = g_browser_process->local_state();
258 return prefs->GetBoolean(kServicesCustomizationAppliedPref); 259 return prefs->GetBoolean(kServicesCustomizationAppliedPref);
259 } 260 }
260 261
261 // static 262 // static
262 void ServicesCustomizationDocument::SetApplied(bool val) { 263 void ServicesCustomizationDocument::SetApplied(bool val) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 locale, kAppContentAttr, kInitialStartPageAttr); 335 locale, kAppContentAttr, kInitialStartPageAttr);
335 } 336 }
336 337
337 std::string ServicesCustomizationDocument::GetSupportPage( 338 std::string ServicesCustomizationDocument::GetSupportPage(
338 const std::string& locale) const { 339 const std::string& locale) const {
339 return GetLocaleSpecificString( 340 return GetLocaleSpecificString(
340 locale, kAppContentAttr, kSupportPageAttr); 341 locale, kAppContentAttr, kSupportPageAttr);
341 } 342 }
342 343
343 } // namespace chromeos 344 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/customization_document.h ('k') | chrome/browser/chromeos/display/display_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698