| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
| 9 #include "base/metrics/statistics_recorder.h" | 9 #include "base/metrics/statistics_recorder.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 : dictionary_(dictionary) {} | 120 : dictionary_(dictionary) {} |
| 121 virtual ~SyncChangeProcessorDelegate() {} | 121 virtual ~SyncChangeProcessorDelegate() {} |
| 122 | 122 |
| 123 // Overridden from syncer::SyncChangeProcessor: | 123 // Overridden from syncer::SyncChangeProcessor: |
| 124 virtual syncer::SyncError ProcessSyncChanges( | 124 virtual syncer::SyncError ProcessSyncChanges( |
| 125 const tracked_objects::Location& from_here, | 125 const tracked_objects::Location& from_here, |
| 126 const syncer::SyncChangeList& change_list) OVERRIDE { | 126 const syncer::SyncChangeList& change_list) OVERRIDE { |
| 127 return dictionary_->ProcessSyncChanges(from_here, change_list); | 127 return dictionary_->ProcessSyncChanges(from_here, change_list); |
| 128 } | 128 } |
| 129 | 129 |
| 130 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const |
| 131 OVERRIDE { |
| 132 return syncer::SyncDataList(); |
| 133 } |
| 134 |
| 130 private: | 135 private: |
| 131 SpellcheckCustomDictionary* dictionary_; | 136 SpellcheckCustomDictionary* dictionary_; |
| 132 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); | 137 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); |
| 133 }; | 138 }; |
| 134 | 139 |
| 135 // An implementation of SyncErrorFactory that does not upload the error message | 140 // An implementation of SyncErrorFactory that does not upload the error message |
| 136 // and updates an outside error counter. This lets us know the number of error | 141 // and updates an outside error counter. This lets us know the number of error |
| 137 // messages in an instance of this class after that instance is deleted. | 142 // messages in an instance of this class after that instance is deleted. |
| 138 class SyncErrorFactoryStub : public syncer::SyncErrorFactory { | 143 class SyncErrorFactoryStub : public syncer::SyncErrorFactory { |
| 139 public: | 144 public: |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 SpellcheckServiceFactory::GetForProfile(&profile_); | 1134 SpellcheckServiceFactory::GetForProfile(&profile_); |
| 1130 SpellcheckCustomDictionary* custom_dictionary = | 1135 SpellcheckCustomDictionary* custom_dictionary = |
| 1131 spellcheck_service->GetCustomDictionary(); | 1136 spellcheck_service->GetCustomDictionary(); |
| 1132 OnLoaded(*custom_dictionary, WordList()); | 1137 OnLoaded(*custom_dictionary, WordList()); |
| 1133 EXPECT_FALSE(custom_dictionary->HasWord("foo")); | 1138 EXPECT_FALSE(custom_dictionary->HasWord("foo")); |
| 1134 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1139 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
| 1135 custom_dictionary->AddWord("foo"); | 1140 custom_dictionary->AddWord("foo"); |
| 1136 EXPECT_TRUE(custom_dictionary->HasWord("foo")); | 1141 EXPECT_TRUE(custom_dictionary->HasWord("foo")); |
| 1137 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1142 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
| 1138 } | 1143 } |
| OLD | NEW |