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

Side by Side Diff: components/sync/engine/cycle/status_counters.cc

Issue 2387553002: [Sync] Removing duplicated includes between cc and h files. (Closed)
Patch Set: Fixing DataTypeStatusTable Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/sync/engine/cycle/status_counters.h" 5 #include "components/sync/engine/cycle/status_counters.h"
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/values.h"
9 8
10 namespace syncer { 9 namespace syncer {
11 10
12 StatusCounters::StatusCounters() 11 StatusCounters::StatusCounters()
13 : num_entries(0), num_entries_and_tombstones(0) {} 12 : num_entries(0), num_entries_and_tombstones(0) {}
14 13
15 StatusCounters::~StatusCounters() {} 14 StatusCounters::~StatusCounters() {}
16 15
17 std::unique_ptr<base::DictionaryValue> StatusCounters::ToValue() const { 16 std::unique_ptr<base::DictionaryValue> StatusCounters::ToValue() const {
18 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 17 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
19 value->SetInteger("numEntries", num_entries); 18 value->SetInteger("numEntries", num_entries);
20 value->SetInteger("numEntriesAndTombstones", num_entries_and_tombstones); 19 value->SetInteger("numEntriesAndTombstones", num_entries_and_tombstones);
21 return value; 20 return value;
22 } 21 }
23 22
24 std::string StatusCounters::ToString() const { 23 std::string StatusCounters::ToString() const {
25 std::string result; 24 std::string result;
26 std::unique_ptr<base::DictionaryValue> value = ToValue(); 25 std::unique_ptr<base::DictionaryValue> value = ToValue();
27 JSONStringValueSerializer serializer(&result); 26 JSONStringValueSerializer serializer(&result);
28 serializer.Serialize(*value); 27 serializer.Serialize(*value);
29 return result; 28 return result;
30 } 29 }
31 30
32 } // namespace syncer 31 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine/cycle/commit_counters.cc ('k') | components/sync/engine/cycle/sync_cycle_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698