| 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/sync/sync_prefs.h" | 5 #include "chrome/browser/sync/sync_prefs.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "chrome/test/base/testing_pref_service_syncable.h" | 9 #include "chrome/test/base/testing_pref_service_syncable.h" |
| 10 #include "sync/internal_api/public/base/model_type.h" | 10 #include "sync/internal_api/public/base/model_type.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 for (syncer::ModelTypeSet::Iterator it = user_visible_types.First(); | 90 for (syncer::ModelTypeSet::Iterator it = user_visible_types.First(); |
| 91 it.Good(); it.Inc()) { | 91 it.Good(); it.Inc()) { |
| 92 syncer::ModelTypeSet preferred_types; | 92 syncer::ModelTypeSet preferred_types; |
| 93 preferred_types.Put(it.Get()); | 93 preferred_types.Put(it.Get()); |
| 94 syncer::ModelTypeSet expected_preferred_types(preferred_types); | 94 syncer::ModelTypeSet expected_preferred_types(preferred_types); |
| 95 if (it.Get() == syncer::AUTOFILL) { | 95 if (it.Get() == syncer::AUTOFILL) { |
| 96 expected_preferred_types.Put(syncer::AUTOFILL_PROFILE); | 96 expected_preferred_types.Put(syncer::AUTOFILL_PROFILE); |
| 97 } | 97 } |
| 98 if (it.Get() == syncer::PREFERENCES) { | 98 if (it.Get() == syncer::PREFERENCES) { |
| 99 expected_preferred_types.Put(syncer::DICTIONARY); | 99 expected_preferred_types.Put(syncer::DICTIONARY); |
| 100 expected_preferred_types.Put(syncer::PRIORITY_PREFERENCES); |
| 100 expected_preferred_types.Put(syncer::SEARCH_ENGINES); | 101 expected_preferred_types.Put(syncer::SEARCH_ENGINES); |
| 101 } | 102 } |
| 102 if (it.Get() == syncer::APPS) { | 103 if (it.Get() == syncer::APPS) { |
| 103 expected_preferred_types.Put(syncer::APP_NOTIFICATIONS); | 104 expected_preferred_types.Put(syncer::APP_NOTIFICATIONS); |
| 104 expected_preferred_types.Put(syncer::APP_SETTINGS); | 105 expected_preferred_types.Put(syncer::APP_SETTINGS); |
| 105 } | 106 } |
| 106 if (it.Get() == syncer::EXTENSIONS) { | 107 if (it.Get() == syncer::EXTENSIONS) { |
| 107 expected_preferred_types.Put(syncer::EXTENSION_SETTINGS); | 108 expected_preferred_types.Put(syncer::EXTENSION_SETTINGS); |
| 108 } | 109 } |
| 109 if (it.Get() == syncer::SESSIONS) { | 110 if (it.Get() == syncer::SESSIONS) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); | 189 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); |
| 189 const syncer::ModelTypeSet user_types = syncer::UserTypes(); | 190 const syncer::ModelTypeSet user_types = syncer::UserTypes(); |
| 190 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); | 191 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); |
| 191 EXPECT_FALSE(sync_prefs.IsManaged()); | 192 EXPECT_FALSE(sync_prefs.IsManaged()); |
| 192 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); | 193 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); |
| 193 } | 194 } |
| 194 | 195 |
| 195 } // namespace | 196 } // namespace |
| 196 | 197 |
| 197 } // namespace browser_sync | 198 } // namespace browser_sync |
| OLD | NEW |