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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_factory.h ('k') | chrome/browser/sync/sync_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 DCHECK(profile); 64 DCHECK(profile);
65 SpellcheckService* spellcheck = new SpellcheckService(profile); 65 SpellcheckService* spellcheck = new SpellcheckService(profile);
66 66
67 // Instantiates Metrics object for spellchecking for use. 67 // Instantiates Metrics object for spellchecking for use.
68 spellcheck->StartRecordingMetrics( 68 spellcheck->StartRecordingMetrics(
69 profile->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); 69 profile->GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck));
70 70
71 return spellcheck; 71 return spellcheck;
72 } 72 }
73 73
74 void SpellcheckServiceFactory::RegisterUserPrefs( 74 void SpellcheckServiceFactory::RegisterProfilePrefs(
75 user_prefs::PrefRegistrySyncable* user_prefs) { 75 user_prefs::PrefRegistrySyncable* user_prefs) {
76 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. 76 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string.
77 user_prefs->RegisterLocalizedStringPref( 77 user_prefs->RegisterLocalizedStringPref(
78 prefs::kSpellCheckDictionary, 78 prefs::kSpellCheckDictionary,
79 IDS_SPELLCHECK_DICTIONARY, 79 IDS_SPELLCHECK_DICTIONARY,
80 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 80 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
81 user_prefs->RegisterBooleanPref( 81 user_prefs->RegisterBooleanPref(
82 prefs::kSpellCheckConfirmDialogShown, 82 prefs::kSpellCheckConfirmDialogShown,
83 false, 83 false,
84 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 84 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
(...skipping 12 matching lines...) Expand all
97 } 97 }
98 98
99 content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse( 99 content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
100 content::BrowserContext* context) const { 100 content::BrowserContext* context) const {
101 return chrome::GetBrowserContextRedirectedInIncognito(context); 101 return chrome::GetBrowserContextRedirectedInIncognito(context);
102 } 102 }
103 103
104 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const { 104 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const {
105 return true; 105 return true;
106 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_factory.h ('k') | chrome/browser/sync/sync_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698