OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_profile.h" | 5 #include "chrome/browser/spellchecker/spellcheck_profile.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/spellchecker/spellcheck_host.h" | 13 #include "chrome/browser/spellchecker/spellcheck_host.h" |
14 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | 14 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
15 #include "chrome/common/chrome_constants.h" | 15 #include "chrome/common/chrome_constants.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 | 17 |
| 18 using content::BrowserThread; |
| 19 |
18 namespace { | 20 namespace { |
19 base::LazyInstance<SpellCheckProfile::CustomWordList> g_empty_list( | 21 base::LazyInstance<SpellCheckProfile::CustomWordList> g_empty_list( |
20 base::LINKER_INITIALIZED); | 22 base::LINKER_INITIALIZED); |
21 } // namespace | 23 } // namespace |
22 | 24 |
23 SpellCheckProfile::SpellCheckProfile(const FilePath& profile_dir) | 25 SpellCheckProfile::SpellCheckProfile(const FilePath& profile_dir) |
24 : host_ready_(false), | 26 : host_ready_(false), |
25 profile_dir_(profile_dir) { | 27 profile_dir_(profile_dir) { |
26 } | 28 } |
27 | 29 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 140 } |
139 | 141 |
140 const FilePath& SpellCheckProfile::GetCustomDictionaryPath() { | 142 const FilePath& SpellCheckProfile::GetCustomDictionaryPath() { |
141 if (!custom_dictionary_path_.get()) { | 143 if (!custom_dictionary_path_.get()) { |
142 custom_dictionary_path_.reset( | 144 custom_dictionary_path_.reset( |
143 new FilePath(profile_dir_.Append(chrome::kCustomDictionaryFileName))); | 145 new FilePath(profile_dir_.Append(chrome::kCustomDictionaryFileName))); |
144 } | 146 } |
145 | 147 |
146 return *custom_dictionary_path_; | 148 return *custom_dictionary_path_; |
147 } | 149 } |
OLD | NEW |