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_service.h" | 5 #include "chrome/browser/spellchecker/spellcheck_service.h" |
6 | 6 |
7 #include "base/platform_file.h" | 7 #include "base/platform_file.h" |
| 8 #include "base/prefs/pref_member.h" |
8 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
9 #include "base/prefs/public/pref_member.h" | |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 13 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
14 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | 14 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
15 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" | 15 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" |
16 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" | 16 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/spellcheck_messages.h" | 18 #include "chrome/common/spellcheck_messages.h" |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 hunspell_dictionary_->AddObserver(this); | 276 hunspell_dictionary_->AddObserver(this); |
277 hunspell_dictionary_->Load(); | 277 hunspell_dictionary_->Load(); |
278 } | 278 } |
279 | 279 |
280 void SpellcheckService::OnUseSpellingServiceChanged() { | 280 void SpellcheckService::OnUseSpellingServiceChanged() { |
281 bool enabled = pref_change_registrar_.prefs()->GetBoolean( | 281 bool enabled = pref_change_registrar_.prefs()->GetBoolean( |
282 prefs::kSpellCheckUseSpellingService); | 282 prefs::kSpellCheckUseSpellingService); |
283 if (metrics_) | 283 if (metrics_) |
284 metrics_->RecordSpellingServiceStats(enabled); | 284 metrics_->RecordSpellingServiceStats(enabled); |
285 } | 285 } |
OLD | NEW |