| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 for (syncer::ModelTypeSet::Iterator it = user_visible_types.First(); | 94 for (syncer::ModelTypeSet::Iterator it = user_visible_types.First(); |
| 95 it.Good(); it.Inc()) { | 95 it.Good(); it.Inc()) { |
| 96 syncer::ModelTypeSet preferred_types; | 96 syncer::ModelTypeSet preferred_types; |
| 97 preferred_types.Put(it.Get()); | 97 preferred_types.Put(it.Get()); |
| 98 syncer::ModelTypeSet expected_preferred_types(preferred_types); | 98 syncer::ModelTypeSet expected_preferred_types(preferred_types); |
| 99 if (it.Get() == syncer::AUTOFILL) { | 99 if (it.Get() == syncer::AUTOFILL) { |
| 100 expected_preferred_types.Put(syncer::AUTOFILL_PROFILE); | 100 expected_preferred_types.Put(syncer::AUTOFILL_PROFILE); |
| 101 } | 101 } |
| 102 if (it.Get() == syncer::PREFERENCES) { | 102 if (it.Get() == syncer::PREFERENCES) { |
| 103 expected_preferred_types.Put(syncer::DICTIONARY); | 103 expected_preferred_types.Put(syncer::DICTIONARY); |
| 104 expected_preferred_types.Put(syncer::PRIORITY_PREFERENCES); |
| 104 expected_preferred_types.Put(syncer::SEARCH_ENGINES); | 105 expected_preferred_types.Put(syncer::SEARCH_ENGINES); |
| 105 } | 106 } |
| 106 if (it.Get() == syncer::APPS) { | 107 if (it.Get() == syncer::APPS) { |
| 107 expected_preferred_types.Put(syncer::APP_NOTIFICATIONS); | 108 expected_preferred_types.Put(syncer::APP_NOTIFICATIONS); |
| 108 expected_preferred_types.Put(syncer::APP_SETTINGS); | 109 expected_preferred_types.Put(syncer::APP_SETTINGS); |
| 109 } | 110 } |
| 110 if (it.Get() == syncer::EXTENSIONS) { | 111 if (it.Get() == syncer::EXTENSIONS) { |
| 111 expected_preferred_types.Put(syncer::EXTENSION_SETTINGS); | 112 expected_preferred_types.Put(syncer::EXTENSION_SETTINGS); |
| 112 } | 113 } |
| 113 if (it.Get() == syncer::TYPED_URLS) { | 114 if (it.Get() == syncer::TYPED_URLS) { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); | 199 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); |
| 199 const syncer::ModelTypeSet user_types = syncer::UserTypes(); | 200 const syncer::ModelTypeSet user_types = syncer::UserTypes(); |
| 200 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); | 201 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); |
| 201 EXPECT_FALSE(sync_prefs.IsManaged()); | 202 EXPECT_FALSE(sync_prefs.IsManaged()); |
| 202 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); | 203 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); |
| 203 } | 204 } |
| 204 | 205 |
| 205 } // namespace | 206 } // namespace |
| 206 | 207 |
| 207 } // namespace browser_sync | 208 } // namespace browser_sync |
| OLD | NEW |