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

Side by Side Diff: sync/internal_api/public/sessions/sync_source_info.cc

Issue 19982002: sync: Remove SyncSourceInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert SyncShareRecords to typedef Created 7 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sync/internal_api/public/sessions/sync_source_info.h"
6
7 #include "base/values.h"
8 #include "sync/protocol/proto_enum_conversions.h"
9
10 namespace syncer {
11 namespace sessions {
12
13 SyncSourceInfo::SyncSourceInfo()
14 : updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN) {}
15
16 SyncSourceInfo::SyncSourceInfo(const ModelTypeInvalidationMap& t)
17 : updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN), types(t) {}
18
19 SyncSourceInfo::SyncSourceInfo(
20 const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u,
21 const ModelTypeInvalidationMap& t)
22 : updates_source(u), types(t) {}
23
24 SyncSourceInfo::~SyncSourceInfo() {}
25
26 base::DictionaryValue* SyncSourceInfo::ToValue() const {
27 base::DictionaryValue* value = new base::DictionaryValue();
28 value->SetString("updatesSource",
29 GetUpdatesSourceString(updates_source));
30 value->Set("types", ModelTypeInvalidationMapToValue(types));
31 return value;
32 }
33
34 } // namespace sessions
35 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/sync_source_info.h ('k') | sync/internal_api/public/sessions/sync_source_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698