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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_factory.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/spellchecker/spellcheck_factory.h" 5 #include "chrome/browser/spellchecker/spellcheck_factory.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_dependency_manager.h" 10 #include "chrome/browser/profiles/profile_dependency_manager.h"
(...skipping 27 matching lines...) Expand all
38 DCHECK(profile); 38 DCHECK(profile);
39 SpellcheckService* spellcheck = new SpellcheckService(profile); 39 SpellcheckService* spellcheck = new SpellcheckService(profile);
40 40
41 // Instantiates Metrics object for spellchecking for use. 41 // Instantiates Metrics object for spellchecking for use.
42 spellcheck->StartRecordingMetrics( 42 spellcheck->StartRecordingMetrics(
43 profile->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); 43 profile->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck));
44 44
45 return spellcheck; 45 return spellcheck;
46 } 46 }
47 47
48 void SpellcheckServiceFactory::RegisterUserPrefs(PrefService* user_prefs) { 48 void SpellcheckServiceFactory::RegisterUserPrefs(
49 PrefServiceSyncable* user_prefs) {
49 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. 50 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string.
50 user_prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary, 51 user_prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary,
51 IDS_SPELLCHECK_DICTIONARY, 52 IDS_SPELLCHECK_DICTIONARY,
52 PrefService::UNSYNCABLE_PREF); 53 PrefServiceSyncable::UNSYNCABLE_PREF);
53 user_prefs->RegisterBooleanPref(prefs::kSpellCheckConfirmDialogShown, 54 user_prefs->RegisterBooleanPref(prefs::kSpellCheckConfirmDialogShown,
54 false, 55 false,
55 PrefService::UNSYNCABLE_PREF); 56 PrefServiceSyncable::UNSYNCABLE_PREF);
56 user_prefs->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, 57 user_prefs->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService,
57 false, 58 false,
58 PrefService::UNSYNCABLE_PREF); 59 PrefServiceSyncable::UNSYNCABLE_PREF);
59 user_prefs->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, 60 user_prefs->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck,
60 true, 61 true,
61 PrefService::SYNCABLE_PREF); 62 PrefServiceSyncable::SYNCABLE_PREF);
62 user_prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, 63 user_prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect,
63 false, 64 false,
64 PrefService::SYNCABLE_PREF); 65 PrefServiceSyncable::SYNCABLE_PREF);
65 } 66 }
66 67
67 bool SpellcheckServiceFactory::ServiceRedirectedInIncognito() const { 68 bool SpellcheckServiceFactory::ServiceRedirectedInIncognito() const {
68 return true; 69 return true;
69 } 70 }
70 71
71 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const { 72 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const {
72 return true; 73 return true;
73 } 74 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_factory.h ('k') | chrome/browser/sync/glue/session_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698