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

Unified Diff: sync/internal_api/change_record.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/base_transaction.cc ('k') | sync/internal_api/change_reorder_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/change_record.cc
diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc
deleted file mode 100644
index 97cfeef77fc91395702a6c4907c62113f0b0b0ee..0000000000000000000000000000000000000000
--- a/sync/internal_api/change_record.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sync/internal_api/public/change_record.h"
-
-#include <string>
-
-#include "base/strings/string_number_conversions.h"
-#include "base/values.h"
-#include "sync/internal_api/public/base_node.h"
-#include "sync/internal_api/public/read_node.h"
-#include "sync/protocol/proto_value_conversions.h"
-
-namespace syncer {
-
-ChangeRecord::ChangeRecord()
- : id(kInvalidId), action(ACTION_ADD) {}
-
-ChangeRecord::ChangeRecord(const ChangeRecord& other) = default;
-
-ChangeRecord::~ChangeRecord() {}
-
-std::unique_ptr<base::DictionaryValue> ChangeRecord::ToValue() const {
- std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
- std::string action_str;
- switch (action) {
- case ACTION_ADD:
- action_str = "Add";
- break;
- case ACTION_DELETE:
- action_str = "Delete";
- break;
- case ACTION_UPDATE:
- action_str = "Update";
- break;
- default:
- NOTREACHED();
- action_str = "Unknown";
- break;
- }
- value->SetString("action", action_str);
- value->SetString("id", base::Int64ToString(id));
- if (action == ACTION_DELETE) {
- if (extra.get()) {
- value->Set("extra", extra->ToValue());
- }
- value->Set("specifics", EntitySpecificsToValue(specifics));
- }
- return value;
-}
-
-ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData() {}
-
-ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData(
- const sync_pb::PasswordSpecificsData& data)
- : unencrypted_(data) {
-}
-
-ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {}
-
-std::unique_ptr<base::DictionaryValue> ExtraPasswordChangeRecordData::ToValue()
- const {
- return PasswordSpecificsDataToValue(unencrypted_);
-}
-
-const sync_pb::PasswordSpecificsData&
- ExtraPasswordChangeRecordData::unencrypted() const {
- return unencrypted_;
-}
-
-} // namespace syncer
« no previous file with comments | « sync/internal_api/base_transaction.cc ('k') | sync/internal_api/change_reorder_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698