Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Side by Side Diff: chrome/browser/sync/test/integration/dictionary_helper.cc

Issue 12096116: Enable dictionary sync by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sync/test/integration/dictionary_helper.h" 5 #include "chrome/browser/sync/test/integration/dictionary_helper.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/spellchecker/spellcheck_factory.h" 8 #include "chrome/browser/spellchecker/spellcheck_factory.h"
9 #include "chrome/browser/spellchecker/spellcheck_service.h" 9 #include "chrome/browser/spellchecker/spellcheck_service.h"
10 #include "chrome/browser/sync/profile_sync_service_harness.h" 10 #include "chrome/browser/sync/profile_sync_service_harness.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (reference != HaveWord(i, word)) { 83 if (reference != HaveWord(i, word)) {
84 return false; 84 return false;
85 } 85 }
86 } 86 }
87 return true; 87 return true;
88 } 88 }
89 89
90 } // namespace 90 } // namespace
91 91
92 92
93 void EnableDictionarySync(CommandLine* cl) {
94 CommandLine::ForCurrentProcess()->AppendSwitch(
95 switches::kEnableSyncDictionary);
96 }
97
98 void LoadDictionaries() { 93 void LoadDictionaries() {
99 for (int i = 0; i < sync_datatype_helper::test()->num_clients(); ++i) 94 for (int i = 0; i < sync_datatype_helper::test()->num_clients(); ++i)
100 LoadDictionary(GetDictionary(i)); 95 LoadDictionary(GetDictionary(i));
101 if (sync_datatype_helper::test()->use_verifier()) 96 if (sync_datatype_helper::test()->use_verifier())
102 LoadDictionary(GetVerifierDictionary()); 97 LoadDictionary(GetVerifierDictionary());
103 } 98 }
104 99
105 size_t GetDictionarySize(int index) { 100 size_t GetDictionarySize(int index) {
106 return GetDictionary(index)->GetWords().size(); 101 return GetDictionary(index)->GetWords().size();
107 } 102 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 bool result = DictionarySyncIntegrationTestHelper::ApplyChange( 155 bool result = DictionarySyncIntegrationTestHelper::ApplyChange(
161 GetDictionary(index), dictionary_change); 156 GetDictionary(index), dictionary_change);
162 if (sync_datatype_helper::test()->use_verifier()) { 157 if (sync_datatype_helper::test()->use_verifier()) {
163 result &= DictionarySyncIntegrationTestHelper::ApplyChange( 158 result &= DictionarySyncIntegrationTestHelper::ApplyChange(
164 GetVerifierDictionary(), dictionary_change); 159 GetVerifierDictionary(), dictionary_change);
165 } 160 }
166 return result; 161 return result;
167 } 162 }
168 163
169 } // namespace dictionary_helper 164 } // namespace dictionary_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698