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

Side by Side Diff: chrome/browser/sync/profile_sync_service_harness.cc

Issue 9590002: JSONWriter cleanup: integrate pretty print into write options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict 7. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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/profile_sync_service_harness.h" 5 #include "chrome/browser/sync/profile_sync_service_harness.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <iterator> 8 #include <iterator>
9 #include <ostream> 9 #include <ostream>
10 #include <set> 10 #include <set>
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 size_t ProfileSyncServiceHarness::GetNumDatatypes() const { 1118 size_t ProfileSyncServiceHarness::GetNumDatatypes() const {
1119 browser_sync::DataTypeController::StateMap state_map; 1119 browser_sync::DataTypeController::StateMap state_map;
1120 service_->GetDataTypeControllerStates(&state_map); 1120 service_->GetDataTypeControllerStates(&state_map);
1121 return state_map.size(); 1121 return state_map.size();
1122 } 1122 }
1123 1123
1124 std::string ProfileSyncServiceHarness::GetServiceStatus() { 1124 std::string ProfileSyncServiceHarness::GetServiceStatus() {
1125 DictionaryValue value; 1125 DictionaryValue value;
1126 sync_ui_util::ConstructAboutInformation(service_, &value); 1126 sync_ui_util::ConstructAboutInformation(service_, &value);
1127 std::string service_status; 1127 std::string service_status;
1128 base::JSONWriter::Write(&value, true, &service_status); 1128 base::JSONWriter::WriteWithOptions(&value,
1129 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1130 &service_status);
1129 return service_status; 1131 return service_status;
1130 } 1132 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/notifier/p2p_notifier.cc ('k') | chrome/browser/sync/test/integration/extension_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698