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 <functional> | 7 #include <functional> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/important_file_writer.h" | 10 #include "base/files/important_file_writer.h" |
11 #include "base/md5.h" | 11 #include "base/md5.h" |
12 #include "base/string_split.h" | |
13 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/string_split.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/chrome_constants.h" | 15 #include "chrome/common/chrome_constants.h" |
16 #include "chrome/common/spellcheck_messages.h" | 16 #include "chrome/common/spellcheck_messages.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "sync/api/sync_change.h" | 18 #include "sync/api/sync_change.h" |
19 #include "sync/api/sync_data.h" | 19 #include "sync/api/sync_data.h" |
20 #include "sync/api/sync_error_factory.h" | 20 #include "sync/api/sync_error_factory.h" |
21 #include "sync/protocol/sync.pb.h" | 21 #include "sync/protocol/sync.pb.h" |
22 | 22 |
23 using content::BrowserThread; | 23 using content::BrowserThread; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 void SpellcheckCustomDictionary::Notify( | 546 void SpellcheckCustomDictionary::Notify( |
547 const SpellcheckCustomDictionary::Change& dictionary_change) { | 547 const SpellcheckCustomDictionary::Change& dictionary_change) { |
548 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 548 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
549 if (!IsLoaded() || dictionary_change.empty()) | 549 if (!IsLoaded() || dictionary_change.empty()) |
550 return; | 550 return; |
551 FOR_EACH_OBSERVER(Observer, | 551 FOR_EACH_OBSERVER(Observer, |
552 observers_, | 552 observers_, |
553 OnCustomDictionaryChanged(dictionary_change)); | 553 OnCustomDictionaryChanged(dictionary_change)); |
554 } | 554 } |
OLD | NEW |