| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h" |
| 5 #include "chrome/browser/spellchecker.h" | 6 #include "chrome/browser/spellchecker.h" |
| 6 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 7 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 8 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 9 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 12 #include "base/stats_counters.h" | 13 #include "base/stats_counters.h" |
| 13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 14 #include "base/thread.h" | 15 #include "base/thread.h" |
| 15 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/net/url_fetcher.h" | 17 #include "chrome/browser/net/url_fetcher.h" |
| 17 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
| 18 #include "chrome/common/chrome_constants.h" | 19 #include "chrome/common/chrome_constants.h" |
| 19 #include "chrome/common/chrome_counters.h" | 20 #include "chrome/common/chrome_counters.h" |
| 20 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 21 #include "chrome/common/l10n_util.h" | |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "chrome/common/pref_service.h" | 23 #include "chrome/common/pref_service.h" |
| 24 #include "chrome/third_party/hunspell/src/hunspell/hunspell.hxx" | 24 #include "chrome/third_party/hunspell/src/hunspell/hunspell.hxx" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| 26 #include "grit/locale_settings.h" | 26 #include "grit/locale_settings.h" |
| 27 #include "net/url_request/url_request.h" | 27 #include "net/url_request/url_request.h" |
| 28 | 28 |
| 29 using base::TimeTicks; | 29 using base::TimeTicks; |
| 30 | 30 |
| 31 static const int kMaxSuggestions = 5; // Max number of dictionary suggestions. | 31 static const int kMaxSuggestions = 5; // Max number of dictionary suggestions. |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 hunspell_->put_word(word_to_add.c_str()); | 628 hunspell_->put_word(word_to_add.c_str()); |
| 629 | 629 |
| 630 // Now add the word to the custom dictionary file. | 630 // Now add the word to the custom dictionary file. |
| 631 Task* write_word_task = | 631 Task* write_word_task = |
| 632 new AddWordToCustomDictionaryTask(custom_dictionary_file_name_, word); | 632 new AddWordToCustomDictionaryTask(custom_dictionary_file_name_, word); |
| 633 if (file_loop_) | 633 if (file_loop_) |
| 634 file_loop_->PostTask(FROM_HERE, write_word_task); | 634 file_loop_->PostTask(FROM_HERE, write_word_task); |
| 635 else | 635 else |
| 636 write_word_task->Run(); | 636 write_word_task->Run(); |
| 637 } | 637 } |
| OLD | NEW |