| OLD | NEW |
| 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/sessions/session_state.h" | 5 #include "chrome/browser/sync/sessions/session_state.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 initial_sync_ended, | 155 initial_sync_ended, |
| 156 download_progress_markers, | 156 download_progress_markers, |
| 157 kHasMoreToSync, | 157 kHasMoreToSync, |
| 158 kIsSilenced, | 158 kIsSilenced, |
| 159 kUnsyncedCount, | 159 kUnsyncedCount, |
| 160 kNumBlockingConflictingUpdates, | 160 kNumBlockingConflictingUpdates, |
| 161 kNumConflictingUpdates, | 161 kNumConflictingUpdates, |
| 162 kDidCommitItems, | 162 kDidCommitItems, |
| 163 source, | 163 source, |
| 164 0, | 164 0, |
| 165 base::Time::Now()); | 165 base::Time::Now(), |
| 166 SyncError()); |
| 166 scoped_ptr<DictionaryValue> value(snapshot.ToValue()); | 167 scoped_ptr<DictionaryValue> value(snapshot.ToValue()); |
| 167 EXPECT_EQ(14u, value->size()); | 168 EXPECT_EQ(14u, value->size()); |
| 168 ExpectDictDictionaryValue(*expected_syncer_status_value, *value, | 169 ExpectDictDictionaryValue(*expected_syncer_status_value, *value, |
| 169 "syncerStatus"); | 170 "syncerStatus"); |
| 170 ExpectDictDictionaryValue(*expected_errors_value, *value, "errors"); | 171 ExpectDictDictionaryValue(*expected_errors_value, *value, "errors"); |
| 171 ExpectDictIntegerValue(kNumServerChangesRemaining, *value, | 172 ExpectDictIntegerValue(kNumServerChangesRemaining, *value, |
| 172 "numServerChangesRemaining"); | 173 "numServerChangesRemaining"); |
| 173 ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable"); | 174 ExpectDictBooleanValue(kIsShareUsable, *value, "isShareUsable"); |
| 174 ExpectDictListValue(*expected_initial_sync_ended_value, *value, | 175 ExpectDictListValue(*expected_initial_sync_ended_value, *value, |
| 175 "initialSyncEnded"); | 176 "initialSyncEnded"); |
| 176 ExpectDictDictionaryValue(*expected_download_progress_markers_value, | 177 ExpectDictDictionaryValue(*expected_download_progress_markers_value, |
| 177 *value, "downloadProgressMarkers"); | 178 *value, "downloadProgressMarkers"); |
| 178 ExpectDictBooleanValue(kHasMoreToSync, *value, "hasMoreToSync"); | 179 ExpectDictBooleanValue(kHasMoreToSync, *value, "hasMoreToSync"); |
| 179 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced"); | 180 ExpectDictBooleanValue(kIsSilenced, *value, "isSilenced"); |
| 180 ExpectDictIntegerValue(kUnsyncedCount, *value, "unsyncedCount"); | 181 ExpectDictIntegerValue(kUnsyncedCount, *value, "unsyncedCount"); |
| 181 ExpectDictIntegerValue(kNumBlockingConflictingUpdates, *value, | 182 ExpectDictIntegerValue(kNumBlockingConflictingUpdates, *value, |
| 182 "numBlockingConflictingUpdates"); | 183 "numBlockingConflictingUpdates"); |
| 183 ExpectDictIntegerValue(kNumConflictingUpdates, *value, | 184 ExpectDictIntegerValue(kNumConflictingUpdates, *value, |
| 184 "numConflictingUpdates"); | 185 "numConflictingUpdates"); |
| 185 ExpectDictBooleanValue(kDidCommitItems, *value, | 186 ExpectDictBooleanValue(kDidCommitItems, *value, |
| 186 "didCommitItems"); | 187 "didCommitItems"); |
| 187 ExpectDictDictionaryValue(*expected_source_value, *value, "source"); | 188 ExpectDictDictionaryValue(*expected_source_value, *value, "source"); |
| 188 } | 189 } |
| 189 | 190 |
| 190 } // namespace | 191 } // namespace |
| 191 } // namespace sessions | 192 } // namespace sessions |
| 192 } // namespace browser_sync | 193 } // namespace browser_sync |
| OLD | NEW |