| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 : dictionary_(dictionary) {} | 115 : dictionary_(dictionary) {} |
| 116 virtual ~SyncChangeProcessorDelegate() {} | 116 virtual ~SyncChangeProcessorDelegate() {} |
| 117 | 117 |
| 118 // Overridden from syncer::SyncChangeProcessor: | 118 // Overridden from syncer::SyncChangeProcessor: |
| 119 virtual syncer::SyncError ProcessSyncChanges( | 119 virtual syncer::SyncError ProcessSyncChanges( |
| 120 const tracked_objects::Location& from_here, | 120 const tracked_objects::Location& from_here, |
| 121 const syncer::SyncChangeList& change_list) OVERRIDE { | 121 const syncer::SyncChangeList& change_list) OVERRIDE { |
| 122 return dictionary_->ProcessSyncChanges(from_here, change_list); | 122 return dictionary_->ProcessSyncChanges(from_here, change_list); |
| 123 } | 123 } |
| 124 | 124 |
| 125 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const { |
| 126 return syncer::SyncDataList(); |
| 127 } |
| 128 |
| 125 private: | 129 private: |
| 126 SpellcheckCustomDictionary* dictionary_; | 130 SpellcheckCustomDictionary* dictionary_; |
| 127 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); | 131 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); |
| 128 }; | 132 }; |
| 129 | 133 |
| 130 // An implementation of SyncErrorFactory that does not upload the error message | 134 // An implementation of SyncErrorFactory that does not upload the error message |
| 131 // and updates an outside error counter. This lets us know the number of error | 135 // and updates an outside error counter. This lets us know the number of error |
| 132 // messages in an instance of this class after that instance is deleted. | 136 // messages in an instance of this class after that instance is deleted. |
| 133 class SyncErrorFactoryStub : public syncer::SyncErrorFactory { | 137 class SyncErrorFactoryStub : public syncer::SyncErrorFactory { |
| 134 public: | 138 public: |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 SpellcheckServiceFactory::GetForProfile(&profile_); | 1119 SpellcheckServiceFactory::GetForProfile(&profile_); |
| 1116 SpellcheckCustomDictionary* custom_dictionary = | 1120 SpellcheckCustomDictionary* custom_dictionary = |
| 1117 spellcheck_service->GetCustomDictionary(); | 1121 spellcheck_service->GetCustomDictionary(); |
| 1118 OnLoaded(*custom_dictionary, WordList()); | 1122 OnLoaded(*custom_dictionary, WordList()); |
| 1119 EXPECT_FALSE(custom_dictionary->HasWord("foo")); | 1123 EXPECT_FALSE(custom_dictionary->HasWord("foo")); |
| 1120 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1124 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
| 1121 custom_dictionary->AddWord("foo"); | 1125 custom_dictionary->AddWord("foo"); |
| 1122 EXPECT_TRUE(custom_dictionary->HasWord("foo")); | 1126 EXPECT_TRUE(custom_dictionary->HasWord("foo")); |
| 1123 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1127 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
| 1124 } | 1128 } |
| OLD | NEW |