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/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/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_dependency_manager.h" | 11 #include "chrome/browser/profiles/profile_dependency_manager.h" |
11 #include "chrome/browser/spellchecker/spellcheck_service.h" | 12 #include "chrome/browser/spellchecker/spellcheck_service.h" |
12 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
13 #include "components/user_prefs/pref_registry_syncable.h" | 14 #include "components/user_prefs/pref_registry_syncable.h" |
14 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
15 #include "grit/locale_settings.h" | 16 #include "grit/locale_settings.h" |
16 | 17 |
17 // static | 18 // static |
18 SpellcheckService* SpellcheckServiceFactory::GetForProfile(Profile* profile) { | 19 SpellcheckService* SpellcheckServiceFactory::GetForProfile(Profile* profile) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 false, | 84 false, |
84 PrefRegistrySyncable::UNSYNCABLE_PREF); | 85 PrefRegistrySyncable::UNSYNCABLE_PREF); |
85 user_prefs->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, | 86 user_prefs->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, |
86 true, | 87 true, |
87 PrefRegistrySyncable::SYNCABLE_PREF); | 88 PrefRegistrySyncable::SYNCABLE_PREF); |
88 user_prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, | 89 user_prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, |
89 false, | 90 false, |
90 PrefRegistrySyncable::SYNCABLE_PREF); | 91 PrefRegistrySyncable::SYNCABLE_PREF); |
91 } | 92 } |
92 | 93 |
93 bool SpellcheckServiceFactory::ServiceRedirectedInIncognito() const { | 94 content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse( |
94 return true; | 95 content::BrowserContext* context) const { |
| 96 return chrome::GetBrowserContextRedirectedInIncognito(context); |
95 } | 97 } |
96 | 98 |
97 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const { | 99 bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const { |
98 return true; | 100 return true; |
99 } | 101 } |
OLD | NEW |