| 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 "sync/sessions/session_state.h" | 5 #include "sync/sessions/session_state.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 num_server_conflicts); | 169 num_server_conflicts); |
| 170 value->SetBoolean("didCommitItems", did_commit_items); | 170 value->SetBoolean("didCommitItems", did_commit_items); |
| 171 value->SetInteger("numEntries", num_entries); | 171 value->SetInteger("numEntries", num_entries); |
| 172 value->Set("source", source.ToValue()); | 172 value->Set("source", source.ToValue()); |
| 173 return value; | 173 return value; |
| 174 } | 174 } |
| 175 | 175 |
| 176 std::string SyncSessionSnapshot::ToString() const { | 176 std::string SyncSessionSnapshot::ToString() const { |
| 177 scoped_ptr<DictionaryValue> value(ToValue()); | 177 scoped_ptr<DictionaryValue> value(ToValue()); |
| 178 std::string json; | 178 std::string json; |
| 179 base::JSONWriter::Write(value.get(), true, &json); | 179 base::JSONWriter::WriteWithOptions(value.get(), |
| 180 base::JSONWriter::OPTIONS_PRETTY_PRINT, |
| 181 &json); |
| 180 return json; | 182 return json; |
| 181 } | 183 } |
| 182 | 184 |
| 183 ConflictProgress::ConflictProgress(bool* dirty_flag) | 185 ConflictProgress::ConflictProgress(bool* dirty_flag) |
| 184 : num_server_conflicting_items(0), num_hierarchy_conflicting_items(0), | 186 : num_server_conflicting_items(0), num_hierarchy_conflicting_items(0), |
| 185 num_encryption_conflicting_items(0), dirty_(dirty_flag) { | 187 num_encryption_conflicting_items(0), dirty_(dirty_flag) { |
| 186 } | 188 } |
| 187 | 189 |
| 188 ConflictProgress::~ConflictProgress() { | 190 ConflictProgress::~ConflictProgress() { |
| 189 } | 191 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 317 |
| 316 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) | 318 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) |
| 317 : conflict_progress(dirty_flag) { | 319 : conflict_progress(dirty_flag) { |
| 318 } | 320 } |
| 319 | 321 |
| 320 PerModelSafeGroupState::~PerModelSafeGroupState() { | 322 PerModelSafeGroupState::~PerModelSafeGroupState() { |
| 321 } | 323 } |
| 322 | 324 |
| 323 } // namespace sessions | 325 } // namespace sessions |
| 324 } // namespace browser_sync | 326 } // namespace browser_sync |
| OLD | NEW |