| 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_custom_dictionary.h" | 5 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <functional> | 9 #include <functional> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/files/important_file_writer.h" | 13 #include "base/files/important_file_writer.h" |
| 14 #include "base/md5.h" | 14 #include "base/md5.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/string_split.h" | 16 #include "base/strings/string_split.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | |
| 19 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 19 #include "components/spellcheck/browser/spellcheck_host_metrics.h" |
| 20 #include "components/spellcheck/common/spellcheck_common.h" | 20 #include "components/spellcheck/common/spellcheck_common.h" |
| 21 #include "components/sync/api/sync_change.h" | 21 #include "components/sync/api/sync_change.h" |
| 22 #include "components/sync/api/sync_error_factory.h" | 22 #include "components/sync/api/sync_error_factory.h" |
| 23 #include "components/sync/protocol/sync.pb.h" | 23 #include "components/sync/protocol/sync.pb.h" |
| 24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 | 25 |
| 26 using content::BrowserThread; | 26 using content::BrowserThread; |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 } | 519 } |
| 520 | 520 |
| 521 void SpellcheckCustomDictionary::Notify(const Change& dictionary_change) { | 521 void SpellcheckCustomDictionary::Notify(const Change& dictionary_change) { |
| 522 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 522 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 523 if (!IsLoaded() || dictionary_change.empty()) | 523 if (!IsLoaded() || dictionary_change.empty()) |
| 524 return; | 524 return; |
| 525 FOR_EACH_OBSERVER(Observer, | 525 FOR_EACH_OBSERVER(Observer, |
| 526 observers_, | 526 observers_, |
| 527 OnCustomDictionaryChanged(dictionary_change)); | 527 OnCustomDictionaryChanged(dictionary_change)); |
| 528 } | 528 } |
| OLD | NEW |